]> granicus.if.org Git - clang/commit
Make IdentifierResolver::isDeclInScope regard declarations of a parent 'control'...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 9 Sep 2008 21:57:58 +0000 (21:57 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 9 Sep 2008 21:57:58 +0000 (21:57 +0000)
commitf99cb051665d2faab038ed855b2eff15d603796d
treee37e8caa8ad85e78d3ef6f6663757ffdd8e82a93
parenteb7c388bc7ce19fffb8b4b440cee0173297e8490
Make IdentifierResolver::isDeclInScope regard declarations of a parent 'control' scope as part of the current scope.
The 'control' scope is the 'condition' scope of if/switch/while statements and the scope that contains the for-init-statement and 'condition' of a for statement.

e.g:
if (int x = 0 /*'control' scope*/) {
  // x will be regarded as part of this substatement scope.
} else {
  // and as part of this substatement scope too.
}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56020 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/IdentifierResolver.cpp
lib/Sema/IdentifierResolver.h