Revert the right cached files even when there are macros involved.
Fix the semantic of the test.
This commit is contained in:
parent
a0df2fac1d
commit
a1395d0401
@ -194,7 +194,7 @@ namespace cling {
|
||||
void DeclReverter::PreVisitDecl(Decl *D) {
|
||||
const SourceLocation Loc = D->getLocStart();
|
||||
const SourceManager& SM = m_Sema->getSourceManager();
|
||||
FileID FID = SM.getFileID(Loc);
|
||||
FileID FID = SM.getFileID(SM.getSpellingLoc(Loc));
|
||||
if (!FID.isInvalid() && !m_FilesToUncache.count(FID))
|
||||
m_FilesToUncache.insert(FID);
|
||||
}
|
||||
|
@ -3,15 +3,15 @@
|
||||
#define BEGIN_NAMESPACE namespace test_namespace {
|
||||
#define END_NAMESPACE }
|
||||
|
||||
.storeState "testMacroExpansion"
|
||||
.rawInput 1
|
||||
.rawInput 1
|
||||
|
||||
BEGIN_NAMESPACE int j; END_NAMESPACE
|
||||
BEGIN_NAMESPACE int j; END_NAMESPACE // expected-error {{redefinition of 'j'}} expected-note {{previous definition is here}}
|
||||
|
||||
.rawInput 0
|
||||
.storeState "testMacroExpansion"
|
||||
BEGIN_NAMESPACE int j; END_NAMESPACE // expected-error {{redefinition of 'j'}} expected-note {{previous definition is here}}
|
||||
.compareState "testMacroExpansion"
|
||||
// CHECK-NOT: File with AST differencies stored in: testMacroExpansionAST.diff
|
||||
.rawInput 0
|
||||
// CHECK-NOT: Differences
|
||||
// Make FileCheck happy with having at least one positive rule:
|
||||
int a = 5
|
||||
// CHECK: (int) 5
|
||||
|
Loading…
x
Reference in New Issue
Block a user