In response to Richard Smith's comment (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150622/131782.html), this patch disables "redefine_extname" pragma for C++ code. Also, I added a test that this pragma doesn't apply to static declarations.
Details
Diff Detail
Event Timeline
Patch updated in response to Aaron's comments (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150706/132411.html).
Patch updated in response to Aaron's comments (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150706/132552.html).
Just a couple of minor things, otherwise this looks good to me.
lib/Sema/SemaDecl.cpp | ||
---|---|---|
5566–5567 | Drop the else here. | |
test/CodeGen/redefine_extname.c | ||
29 | This expected-warning does nothing, because you don't have a -verify RUN: line. This part of the test should be in test/Sema/something. | |
test/CodeGenCXX/redefine_extname.cpp | ||
34 | Likewise. |
Fix Richard Smith's notes:
- "else" removed form isDeclExternC
- Two new Sema tests added: test/Sema/redefine_extname.c, test/SemaCXX/redefine_extname.cpp
Added "const" specifier as recommended by Aaron (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150713/133400.html).
Drop the else here.