<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:962419283;
        mso-list-type:hybrid;
        mso-list-template-ids:590362304 521833998 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Serge,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thank you for the response. I’m copying Alexey who owns this build-bot.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Best,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>- Asiri<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Serge Pavlov [mailto:sepavloff@gmail.com] <br><b>Sent:</b> 02 December 2014 14:43<br><b>To:</b> Asiri Rathnayake<br><b>Cc:</b> cfe commits<br><b>Subject:</b> Re: r223114 - Emit warning if define or undef reserved identifier or keyword.<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Hi Asiri,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Yes, it is my patch that caused the fail. The file <span style='font-size:13.5pt;font-family:"Courier New";color:black'>include/llvm/Config/config.h</span> contains directive:<o:p></o:p></p></div><div><pre><span style='font-size:13.5pt;color:black'>#undef const<o:p></o:p></span></pre></div><div><p class=MsoNormal>which cause warning. The warning can be removed by specifying -Wno-keyword-macro in command line or<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>#pragma clang diagnostic ignored "-Wkeyword-macro"<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>in source code.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>If none of the methods is practical, please let me know, probably this warning should be turned off by default. <o:p></o:p></p></div><div><p class=MsoNormal><br clear=all><o:p></o:p></p><div><div><p class=MsoNormal>Thanks,<br>--Serge<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>2014-12-02 19:02 GMT+06:00 Asiri Rathnayake <<a href="mailto:asiri.rathnayake@arm.com" target="_blank">asiri.rathnayake@arm.com</a>>:<o:p></o:p></p><p class=MsoNormal>Hi Serge,<br><br>Could you kindly check if the following failures (in sanitizer build) are<br>caused by your patch:<br><br><a href="http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/14359/steps/bootstrap%20clang/logs/stdio" target="_blank">http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/14359/steps/<br>bootstrap%20clang/logs/stdio</a><br><br>It initially failed on my commit and I have committed a fix. The latest<br>failures seem to be related to your patch.<br><br>Thanks!<br><br>--Asiri<o:p></o:p></p><div><div><p class=MsoNormal><br>-----Original Message-----<br>From: <a href="mailto:cfe-commits-bounces@cs.uiuc.edu">cfe-commits-bounces@cs.uiuc.edu</a><br>[mailto:<a href="mailto:cfe-commits-bounces@cs.uiuc.edu">cfe-commits-bounces@cs.uiuc.edu</a>] On Behalf Of Serge Pavlov<br>Sent: 02 December 2014 11:06<br>To: <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>Subject: r223114 - Emit warning if define or undef reserved identifier or<br>keyword.<br><br>Author: sepavloff<br>Date: Tue Dec  2 05:06:09 2014<br>New Revision: 223114<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=223114&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=223114&view=rev</a><br>Log:<br>Emit warning if define or undef reserved identifier or keyword.<br><br>Summary:<br>This change implements warnings if macro name is identical to a keyword or<br>reserved identifier. The warnings are different depending on the "danger"<br>of the operation. Defining macro that replaces a keyword is on by default.<br>Other cases produce warning that is off by default but can be turned on<br>using option -Wreserved-id-macro.<br><br>This change fixes PR11488.<br><br>Reviewers: rnk<br><br>Reviewed By: rnk<br><br>Subscribers: rnk, cfe-commits<br><br>Differential Revision: <a href="http://reviews.llvm.org/D6194" target="_blank">http://reviews.llvm.org/D6194</a><br><br>Modified:<br>    cfe/trunk/include/clang/Basic/DiagnosticGroups.td<br>    cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td<br>    cfe/trunk/include/clang/Basic/IdentifierTable.h<br>    cfe/trunk/lib/Basic/IdentifierTable.cpp<br>    cfe/trunk/lib/Lex/PPDirectives.cpp<br>    cfe/trunk/test/PCH/single-token-macro.c<br>    cfe/trunk/test/Preprocessor/cxx_oper_keyword_ms_compat.cpp<br>    cfe/trunk/test/Sema/thread-specifier.c<br><br>Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td<br>URL:<br><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=223114&r1=223113&r2=223114&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Diagnostic<br>Groups.td?rev=223114&r1=223113&r2=223114&view=diff</a><br>============================================================================<br>==<br>--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)<br>+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Tue Dec  2<o:p></o:p></p></div></div><p class=MsoNormal>+++ 05:06:09 2014<br>@@ -337,6 +337,8 @@ def : DiagGroup<"sequence-point", [Unseq<br><br> // Preprocessor warnings.<br> def AmbiguousMacro : DiagGroup<"ambiguous-macro">;<br>+def KeywordAsMacro : DiagGroup<"keyword-macro">; def ReservedIdAsMacro<br>+: DiagGroup<"reserved-id-macro">;<br><br> // Just silence warnings about -Wstrict-aliasing for now.<br> def : DiagGroup<"strict-aliasing=0">;<br><br>Modified: cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td<br>URL:<br><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td?rev=223114&r1=223113&r2=223114&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Diagnostic<br>LexKinds.td?rev=223114&r1=223113&r2=223114&view=diff</a><br>============================================================================<br>==<br>--- cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td (original)<br>+++ cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td Tue Dec  2<br>+++ 05:06:09 2014<br>@@ -290,6 +290,14 @@ def note_pp_ambiguous_macro_chosen : Not<br>   "expanding this definition of %0">;<br> def note_pp_ambiguous_macro_other : Note<<br>   "other definition of %0">;<br>+def warn_pp_macro_hides_keyword : Warning<<br>+  "keyword or reserved identifier is hidden by macro definition">,<br>+  InGroup<KeywordAsMacro>;<br>+def warn_pp_macro_is_reserved_id : Warning<<br>+  "macro name is a keyword or reserved identifier">,<br>+InGroup<KeywordAsMacro>; def warn_pp_defundef_reserved_ident : Warning<<br>+  "reserved identifier is used as macro name">, DefaultIgnore,<br>+  InGroup<ReservedIdAsMacro>;<br><br> def pp_invalid_string_literal : Warning<<br>   "invalid string literal, ignoring final '\\'">;<br><br>Modified: cfe/trunk/include/clang/Basic/IdentifierTable.h<br>URL:<br><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/IdentifierTable.h?rev=223114&r1=223113&r2=223114&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Identifier<br>Table.h?rev=223114&r1=223113&r2=223114&view=diff</a><br>============================================================================<br>==<br>--- cfe/trunk/include/clang/Basic/IdentifierTable.h (original)<br>+++ cfe/trunk/include/clang/Basic/IdentifierTable.h Tue Dec  2 05:06:09<br>+++ 2014<o:p></o:p></p><div><div><p class=MsoNormal>@@ -249,6 +249,9 @@ public:<br>   }<br>   bool isCPlusPlusOperatorKeyword() const { return IsCPPOperatorKeyword; }<br><br>+  /// \brief Return true if this token is a keyword in the specified<br>language.<br>+  bool isKeyword(const LangOptions &LangOpts);<br>+<br>   /// getFETokenInfo/setFETokenInfo - The language front-end is allowed to<br>   /// associate arbitrary metadata with this token.<br>   template<typename T><br><br>Modified: cfe/trunk/lib/Basic/IdentifierTable.cpp<br>URL:<br><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/IdentifierTable.cpp?rev=223114&r1=223113&r2=223114&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/IdentifierTable.cpp?<br>rev=223114&r1=223113&r2=223114&view=diff</a><br>============================================================================<br>==<br>--- cfe/trunk/lib/Basic/IdentifierTable.cpp (original)<br>+++ cfe/trunk/lib/Basic/IdentifierTable.cpp Tue Dec  2 05:06:09 2014<br>@@ -122,7 +122,7 @@ namespace {<br><br> /// \brief Translates flags as specified in TokenKinds.def into keyword<br>status  /// in the given language standard.<br>-static KeywordStatus GetKeywordStatus(const LangOptions &LangOpts,<br>+static KeywordStatus getKeywordStatus(const LangOptions &LangOpts,<br>                                       unsigned Flags) {<br>   if (Flags == KEYALL) return KS_Enabled;<br>   if (LangOpts.CPlusPlus && (Flags & KEYCXX)) return KS_Enabled; @@ -151,7<br>+151,7 @@ static KeywordStatus GetKeywordStatus(co  static void<br>AddKeyword(StringRef Keyword,<br>                        tok::TokenKind TokenCode, unsigned Flags,<br>                        const LangOptions &LangOpts, IdentifierTable &Table)<br>{<br>-  KeywordStatus AddResult = GetKeywordStatus(LangOpts, Flags);<br>+  KeywordStatus AddResult = getKeywordStatus(LangOpts, Flags);<br><br>   // Don't add this keyword under MSVCCompat.<br>   if (LangOpts.MSVCCompat && (Flags & KEYNOMS)) @@ -209,6 +209,31 @@ void<br>IdentifierTable::AddKeywords(const<br>                LangOpts, *this);<br> }<br><br>+/// \brief Checks if the specified token kind represents a keyword in<o:p></o:p></p></div></div><p class=MsoNormal>+the /// specified language.<o:p></o:p></p><div><div><p class=MsoNormal>+/// \returns Status of the keyword in the language.<br>+static KeywordStatus getTokenKwStatus(const LangOptions &LangOpts,<br>+                                      tok::TokenKind K) {<br>+  switch (K) {<br>+#define KEYWORD(NAME, FLAGS) \<br>+  case tok::kw_##NAME: return getKeywordStatus(LangOpts, FLAGS);<br>+#include "clang/Basic/TokenKinds.def"<br>+  default: return KS_Disabled;<br>+  }<br>+}<br>+<br>+/// \brief Returns true if the identifier represents a keyword in the<br>+/// specified language.<br>+bool IdentifierInfo::isKeyword(const LangOptions &LangOpts) {<br>+  switch (getTokenKwStatus(LangOpts, getTokenID())) {<br>+  case KS_Enabled:<br>+  case KS_Extension:<br>+    return true;<br>+  default:<br>+    return false;<br>+  }<br>+}<br>+<br> tok::PPKeywordKind IdentifierInfo::getPPKeywordID() const {<br>   // We use a perfect hash function here involving the length of the<br>keyword,<br>   // the first and third character.  For preprocessor ID's there are no<br><br>Modified: cfe/trunk/lib/Lex/PPDirectives.cpp<br>URL:<br><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPDirectives.cpp?rev=223114&r1=223113&r2=223114&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPDirectives.cpp?rev=2<br>23114&r1=223113&r2=223114&view=diff</a><br>============================================================================<br>==<br>--- cfe/trunk/lib/Lex/PPDirectives.cpp (original)<br>+++ cfe/trunk/lib/Lex/PPDirectives.cpp Tue Dec  2 05:06:09 2014<br>@@ -100,6 +100,58 @@ void Preprocessor::DiscardUntilEndOfDire<br>   } while (Tmp.isNot(tok::eod));<br> }<br><br>+/// \brief Enumerates possible cases of #define/#undef a reserved<br>identifier.<br>+enum MacroDiag {<br>+  MD_NoWarn,        //> Not a reserved identifier<br>+  MD_KeywordDef,    //> Macro hides keyword, enabled by default<br>+  MD_KeywordUndef,  //> #undef keyword, enabled by default<br>+  MD_WarnStrict     //> Other reserved id, disabled by default<br>+};<br>+<br>+/// \brief Checks if the specified identifier is reserved in the<o:p></o:p></p></div></div><p class=MsoNormal>+specified /// language.<br>+/// This function does not check if the identifier is a keyword.<br>+static bool isReservedId(StringRef Text, const LangOptions &Lang) {<br>+  // C++ [macro.names], C11 7.1.3:<br>+  // All identifiers that begin with an underscore and either an<br>+uppercase<br>+  // letter or another underscore are always reserved for any use.<br>+  if (Text.size() >= 2 && Text[0] == '_' &&<br>+      (isUppercase(Text[1]) || Text[1] == '_'))<br>+    return true;<br>+  // C++ [global.names]<br>+  // Each name that contains a double underscore ... is reserved to the<br>+  // implementation for any use.<br>+  if (Lang.CPlusPlus) {<br>+    if (Text.find("__") != StringRef::npos)<br>+      return true;<br>+  }<br>+  return false;<br>+}<br>+<br>+static MacroDiag shouldWarnOnMacroDef(Preprocessor &PP, IdentifierInfo<br>+*II) {<br>+  const LangOptions &Lang = PP.getLangOpts();<br>+  StringRef Text = II->getName();<br>+  if (isReservedId(Text, Lang))<br>+    return MD_WarnStrict;<br>+  if (II->isKeyword(Lang))<br>+    return MD_KeywordDef;<br>+  if (Lang.CPlusPlus && (Text.equals("override") || Text.equals("final")))<br>+    return MD_KeywordDef;<br>+  return MD_NoWarn;<br>+}<br>+<br>+static MacroDiag shouldWarnOnMacroUndef(Preprocessor &PP,<br>+IdentifierInfo *II) {<br>+  const LangOptions &Lang = PP.getLangOpts();<br>+  if (II->isKeyword(Lang))<br>+    return MD_KeywordUndef;<br>+  StringRef Text = II->getName();<br>+  if (Lang.CPlusPlus && (Text.equals("override") || Text.equals("final")))<br>+    return MD_KeywordUndef;<br>+  if (isReservedId(Text, Lang))<br>+    return MD_WarnStrict;<br>+  return MD_NoWarn;<br>+}<br>+<br> bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse<br>isDefineUndef) {<br>   // Missing macro name?<br>   if (MacroNameTok.is(tok::eod))<br>@@ -140,6 +192,23 @@ bool Preprocessor::CheckMacroName(Token<br>     Diag(MacroNameTok, diag::ext_pp_undef_builtin_macro);<br>   }<br><br>+  // Warn if defining/undefining reserved identifier including keywords.<br>+  SourceLocation MacroNameLoc = MacroNameTok.getLocation();  if<o:p></o:p></p><div><div><p class=MsoNormal>+ (!SourceMgr.isInSystemHeader(MacroNameLoc) &&<br>+      (strcmp(SourceMgr.getBufferName(MacroNameLoc), "<built-in>") != 0)) {<br>+    MacroDiag D = MD_NoWarn;<br>+    if (isDefineUndef == MU_Define)<br>+      D = shouldWarnOnMacroDef(*this, II);<br>+    else if (isDefineUndef == MU_Undef)<br>+      D = shouldWarnOnMacroUndef(*this, II);<br>+    if (D == MD_KeywordDef)<br>+      Diag(MacroNameTok, diag::warn_pp_macro_hides_keyword);<br>+    if (D == MD_KeywordUndef)<br>+      Diag(MacroNameTok, diag::warn_pp_macro_is_reserved_id);<br>+    else if (D == MD_WarnStrict)<br>+      Diag(MacroNameTok, diag::warn_pp_defundef_reserved_ident);<br>+  }<br>+<br>   // Okay, we got a good identifier.<br>   return false;<br> }<br><br>Modified: cfe/trunk/test/PCH/single-token-macro.c<br>URL:<br><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/single-token-macro.c?rev=223114&r1=223113&r2=223114&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/single-token-macro.c?<br>rev=223114&r1=223113&r2=223114&view=diff</a><br>============================================================================<br>==<br>--- cfe/trunk/test/PCH/single-token-macro.c (original)<br>+++ cfe/trunk/test/PCH/single-token-macro.c Tue Dec  2 05:06:09 2014<br>@@ -12,6 +12,8 @@<br> #ifndef HEADER<br> #define HEADER<br><br>+#pragma clang diagnostic ignored "-Wreserved-id-macro"<br>+<br> #ifdef __stdcall<br> // __stdcall is defined as __attribute__((__stdcall__)) for targeting<br>mingw32.<br> #undef __stdcall<br><br>Modified: cfe/trunk/test/Preprocessor/cxx_oper_keyword_ms_compat.cpp<br>URL:<br><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/cxx_oper_keyword_ms_compat.cpp?rev=223114&r1=223113&r2=223114&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/cxx_oper_key<br>word_ms_compat.cpp?rev=223114&r1=223113&r2=223114&view=diff</a><br>============================================================================<br>==<br>--- cfe/trunk/test/Preprocessor/cxx_oper_keyword_ms_compat.cpp (original)<br>+++ cfe/trunk/test/Preprocessor/cxx_oper_keyword_ms_compat.cpp Tue Dec<o:p></o:p></p></div></div><p class=MsoNormal>+++ 2 05:06:09 2014<o:p></o:p></p><div><div><p class=MsoNormal style='margin-bottom:12.0pt'>@@ -1,6 +1,8 @@<br> // RUN: %clang_cc1 %s -E -verify -fms-extensions  //<br>expected-no-diagnostics<br><br>+#pragma clang diagnostic ignored "-Wkeyword-macro"<br>+<br> bool f() {<br>   // Check that operators still work before redefining them.<br> #if compl 0 bitand 1<br><br>Modified: cfe/trunk/test/Sema/thread-specifier.c<br>URL:<br><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/thread-specifier.c?rev=223114&r1=223113&r2=223114&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/thread-specifier.c?r<br>ev=223114&r1=223113&r2=223114&view=diff</a><br>============================================================================<br>==<br>--- cfe/trunk/test/Sema/thread-specifier.c (original)<br>+++ cfe/trunk/test/Sema/thread-specifier.c Tue Dec  2 05:06:09 2014<br>@@ -5,6 +5,8 @@<br> // RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only<br>-Wno-private-extern -verify -pedantic -x c++ %s -DCXX11<br>-D__thread=thread_local -std=c++11 -Wno-deprecated  // RUN: %clang_cc1<br>-triple i686-pc-linux-gnu -fsyntax-only -Wno-private-extern -verify<br>-pedantic -x c++ %s -DC11 -D__thread=_Thread_local -std=c++11<br>-Wno-deprecated<br><br>+#pragma clang diagnostic ignored "-Wkeyword-macro"<br>+<br> #ifdef __cplusplus<br> // In C++, we define __private_extern__ to extern.<br> #undef __private_extern__<br><br><br>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br><br><br><br><o:p></o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></body></html>