]> granicus.if.org Git - clang/commit
This patch (thanks to Doug Gregor) fixes a
authorSean Callanan <scallanan@apple.com>
Fri, 22 Jul 2011 23:46:03 +0000 (23:46 +0000)
committerSean Callanan <scallanan@apple.com>
Fri, 22 Jul 2011 23:46:03 +0000 (23:46 +0000)
commit8cc4fd795e01d50a7a7c96f4c0356d23b00d9349
treefab10ee5b17a4b69f7680250e0c482037d46a1d5
parentcfe1bcb440ef2fde5e0df6e07a5abbeee089e6e7
This patch (thanks to Doug Gregor) fixes a
problem where Clang was setting the
hasExternalVisibleDecls() bit for all
DeclContexts it imported.  This caused Clang
to make unnecessary calls to
findExternalVisibleDecls() when an external
AST source was installed.

In fact, Clang sometimes interpreted a failure
by one of these spurious calls to find a
Decl as meaning the Decl didn't exist, even
though findExternalLexicalDecls() did locate
that decl.  This produced amusing errors of
the form:

-
error: no member named 'b' in 'A'; did you
mean 'b'?
-

Now, if hasExternalVisibleDecls() or
hasExternalLexicalDecls() should be set, the
external AST source must do so itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135824 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ASTImporter.cpp