[PATCH] D144115: [clang] Extend pragma dump to support expressions
Vlad Serebrennikov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 21 23:58:46 PDT 2023
Endill added a comment.
Thank you for review!
================
Comment at: clang/lib/Parse/ParsePragma.cpp:15-17
#include "clang/Basic/TargetInfo.h"
+#include "clang/Lex/LexDiagnostic.h"
#include "clang/Lex/Preprocessor.h"
----------------
aaron.ballman wrote:
>
I'm using `warn_pragma_debug_unexpected_argument` and `warn_pragma_debug_missing_argument` from there as well, and not just added diagnostics. What should I do about that? Copying them over to `DiagnosticParseKinds.td` doesn't work.
================
Comment at: clang/lib/Parse/ParsePragma.cpp:731-736
+ } else if (E.get()->isTypeDependent()) {
+ PP.Diag(StartLoc, diag::warn_pragma_debug_type_dependent_argument)
+ << SourceRange(StartLoc, Tok.getLocation());
+ } else if (E.get()->isValueDependent()) {
+ PP.Diag(StartLoc, diag::warn_pragma_debug_value_dependent_argument)
+ << SourceRange(StartLoc, Tok.getLocation());
----------------
aaron.ballman wrote:
>
I see quite a lot of items inside `ExprDependence`. Are you sure we don't miss any corner cases by using `isValueDependent()` to select between value- and type-dependent diagnostic text?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144115/new/
https://reviews.llvm.org/D144115
More information about the cfe-commits
mailing list