[llvm-branch-commits] [cfe-branch] r310902 - Merging r310706 and r310829:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Aug 14 17:24:02 PDT 2017


Author: hans
Date: Mon Aug 14 17:24:02 2017
New Revision: 310902

URL: http://llvm.org/viewvc/llvm-project?rev=310902&view=rev
Log:
Merging r310706 and r310829:
------------------------------------------------------------------------
r310706 | arphaman | 2017-08-11 05:06:52 -0700 (Fri, 11 Aug 2017) | 11 lines

[modules] Set the lexical DC for dummy tag decls that refer to hidden
declarations that are made visible after the dummy is parsed and ODR verified

Prior to this commit the
"(getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one."),"
assertion failure was triggered during semantic analysis of the dummy
tag declaration that was declared in another tag declaration because its
lexical context did not point to the outer tag decl.

rdar://32292196

------------------------------------------------------------------------

------------------------------------------------------------------------
r310829 | arphaman | 2017-08-14 03:59:44 -0700 (Mon, 14 Aug 2017) | 5 lines

Set the lexical context for dummy tag decl inside createTagFromNewDecl

This is a follow-up to r310706. This change has been recommended by
Bruno Cardoso Lopes and Richard Smith.

------------------------------------------------------------------------

Added:
    cfe/branches/release_50/test/Modules/Inputs/innerstructredef.h
      - copied unchanged from r310706, cfe/trunk/test/Modules/Inputs/innerstructredef.h
    cfe/branches/release_50/test/Modules/inner-struct-redefines-invisible.m
      - copied unchanged from r310706, cfe/trunk/test/Modules/inner-struct-redefines-invisible.m
Modified:
    cfe/branches/release_50/   (props changed)
    cfe/branches/release_50/lib/Sema/SemaDecl.cpp
    cfe/branches/release_50/test/Modules/Inputs/module.map

Propchange: cfe/branches/release_50/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug 14 17:24:02 2017
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:308455,308722,308824,308897,308996,309054,309058,309112-309113,309226,309263,309327,309382-309383,309488,309503,309523,309569,309607,309633,309636,309640,309722,309752,309975,310006,310158,310191,310359,310516,310691-310692,310694,310700,310704,310804
+/cfe/trunk:308455,308722,308824,308897,308996,309054,309058,309112-309113,309226,309263,309327,309382-309383,309488,309503,309523,309569,309607,309633,309636,309640,309722,309752,309975,310006,310158,310191,310359,310516,310691-310692,310694,310700,310704,310706,310804,310829
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_50/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/lib/Sema/SemaDecl.cpp?rev=310902&r1=310901&r2=310902&view=diff
==============================================================================
--- cfe/branches/release_50/lib/Sema/SemaDecl.cpp (original)
+++ cfe/branches/release_50/lib/Sema/SemaDecl.cpp Mon Aug 14 17:24:02 2017
@@ -13293,6 +13293,7 @@ Decl *Sema::ActOnTag(Scope *S, unsigned
         AddMsStructLayoutForRecord(RD);
       }
     }
+    New->setLexicalDeclContext(CurContext);
     return New;
   };
 

Modified: cfe/branches/release_50/test/Modules/Inputs/module.map
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/test/Modules/Inputs/module.map?rev=310902&r1=310901&r2=310902&view=diff
==============================================================================
--- cfe/branches/release_50/test/Modules/Inputs/module.map (original)
+++ cfe/branches/release_50/test/Modules/Inputs/module.map Mon Aug 14 17:24:02 2017
@@ -451,3 +451,12 @@ module DebugNestedB {
 module objcAtKeywordMissingEnd {
   header "objcAtKeywordMissingEnd.h"
 }
+
+module innerstructredef {
+  module one {
+    header "empty.h"
+  }
+  module two {
+   header "innerstructredef.h"
+  }
+}




More information about the llvm-branch-commits mailing list