[PATCH] D55125: [clang-tidy] Fix a false positive in misc-redundant-expression check

Daniel Krupp via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 3 05:02:26 PST 2018


dkrupp marked 2 inline comments as done.
dkrupp added inline comments.


================
Comment at: test/clang-tidy/misc-redundant-expression.cpp:109
 #define COND_OP_OTHER_MACRO 9
+#define COND_OP_THIRD_MACRO COND_OP_MACRO
 int TestConditional(int x, int y) {
----------------
JonasToth wrote:
> dkrupp wrote:
> > JonasToth wrote:
> > > Could you please add a test where the macro is `undef`ed and redefined to something else?
> > I am not sure what you exactly suggest here. It should not matter what COND_OP_THIRD_MACRO is defined to as we lexically compare tokens as they are written in the original source code.
> > 
> > Could you be a bit more specific what test case you would like to add? 
> *should* not matter is my point, please show that :)
undef/define testcase added and passes. @JonasToth is this what you thought of?


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

https://reviews.llvm.org/D55125





More information about the cfe-commits mailing list