In article <CAPtQZ7-7UQAN9KcoQ8XGKht16tiFaRBHq0yM7=qtz-ucek0...@mail.gmail.com>,
Ismail Pazarbasi <[email protected]> writes:
> Yes, that was my concern. I think we should avoid correcting or
> warning about macros eagerly.
I agree.
> // foo.h
> #define EXPECT_FALSE(x) ((x) == false) // macro written in a header file
>
> // foo.cpp
> #include "foo.h"
> #define MY_EXPECT_FALSE(x) ((x) == false)
> static void f() {
> if (EXPECT_FALSE(0 == 1)); // ok
> if (MY_EXPECT_FALSE(0 == 1)); // warn
> }
I will add this (or something similar) to my FileCheck test suite.
I was using isExpansionInMainFile() to avoid matching any system
included headers, but perhaps I was misunderstanding how that
narrowing matcher works.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
The Terminals Wiki <http://terminals.classiccmp.org>
Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits