[cfe-commits] r48841 - /cfe/trunk/lib/Sema/SemaDecl.cpp
Steve Naroff
snaroff at apple.com
Wed Mar 26 14:27:01 PDT 2008
Author: snaroff
Date: Wed Mar 26 16:27:00 2008
New Revision: 48841
URL: http://llvm.org/viewvc/llvm-project?rev=48841&view=rev
Log:
Alloc redeclaration of typedefs within ExternCSystemHeaderDir's AND SystemHeaderDir's.
Modified:
cfe/trunk/lib/Sema/SemaDecl.cpp
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=48841&r1=48840&r2=48841&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Wed Mar 26 16:27:00 2008
@@ -220,11 +220,12 @@
DirectoryLookup::DirType OldDirType = HdrInfo.getFileDirFlavor(OldDeclFile);
DirectoryLookup::DirType NewDirType = HdrInfo.getFileDirFlavor(NewDeclFile);
- if ((OldDirType == DirectoryLookup::ExternCSystemHeaderDir ||
- NewDirType == DirectoryLookup::ExternCSystemHeaderDir) ||
+ // Allow reclarations in both SystemHeaderDir and ExternCSystemHeaderDir.
+ if ((OldDirType != DirectoryLookup::NormalHeaderDir ||
+ NewDirType != DirectoryLookup::NormalHeaderDir) ||
getLangOptions().Microsoft)
return New;
-
+
// TODO: CHECK FOR CONFLICTS, multiple decls with same name in one scope.
// TODO: This is totally simplistic. It should handle merging functions
// together etc, merging extern int X; int X; ...
More information about the cfe-commits
mailing list