-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ASTContext's printing policy, reuse the Sema variable. NFC #1175
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
@@ -170,7 +170,7 @@ struct DiffRequest { | |||
const clang::FunctionDecl* m_TopMostFD = nullptr; | |||
clang::Sema& m_Sema; | |||
|
|||
RequestOptions& m_Options; | |||
const RequestOptions& m_Options; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: member 'm_Options' of type 'const RequestOptions &' is a reference [cppcoreguidelines-avoid-const-or-ref-data-members]
const RequestOptions& m_Options;
^
clang::PrintingPolicy Policy(LangOpts); | ||
Policy.Bool = true; | ||
ASTContext &C = S.getASTContext(); | ||
clang::PrintingPolicy Policy = C.getPrintingPolicy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "clang::PrintingPolicy" is directly included [misc-include-cleaner]
tools/ClangPlugin.cpp:32:
+ #include <clang/AST/PrettyPrinter.h>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1175 +/- ##
==========================================
- Coverage 94.56% 94.56% -0.01%
==========================================
Files 51 51
Lines 8963 8960 -3
==========================================
- Hits 8476 8473 -3
Misses 487 487
|
bfe804b
to
7dec3a9
Compare
7dec3a9
to
0e5b0b1
Compare
No description provided.