carlosgalvezp added inline comments.

================
Comment at: 
clang-tools-extra/clang-tidy/readability/AvoidUnconditionalPreprocessorIfCheck.cpp:41
+
+  bool isStatic(SourceManager &SM, const LangOptions &LangOpts,
+                SourceRange ConditionRange) {
----------------
"static" is an overloaded C++ keyword which can lead to confusion in this 
context (you don't intend to detect whether a token is the `static` keyword). 
Would it be possible to give this a different name? Same for `isStaticToken`


================
Comment at: 
clang-tools-extra/test/clang-tidy/checkers/readability/avoid-unconditional-preprocessor-if.cpp:67-69
+#if 10 > DDD
+// some code
+#endif
----------------
PiotrZSL wrote:
> carlosgalvezp wrote:
> > Add case for if 10 < DDD ?
> > 
> > Also, add test case for comparing 2 macros? If people follow the "no magic 
> > numbers" policy they'll likely have defines for both sides of the 
> > comparison.
> I don't support currently macros, would need to check if they defined 
> unconditionally in same file, and I didn't want to mess with this.
Yes I didn't mean "function-like macros", just a plain define like you just 
added. Great, thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145617/new/

https://reviews.llvm.org/D145617

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to