1258 Commits

Author SHA1 Message Date
Vassil Vassilev
2fe6eb0a6c From Cristina and me: Fix the SubSequentDecls.C
The test #includes a header file which is expected to be reverted.
.storeState and .compareState report that header file is leftover in clang's state.
This is intentionally done, because we cannot free the FileEntry pointing to that
file, because it is referenced all over the Source- and File-Managers. Instead we
clean up the cache of the file so that whoever does a request for that file entry
it will be reread from disk.

Semantically speaking this side effect that store/compare state found must be skipped.
2013-10-16 16:37:58 +02:00
Vassil Vassilev
2872bc06d4 From me and Cristina: Fix removal of out-of-line definitions.
If we had:
struct MyClass {
  void f() {}
}
MyClass::f(){} // expected error redefinition of f.

In that case we would have tried to remove the lookup entry for the decl from
the primary decl context of the lexical decl context, which entry doesn't exist.
It is registered in the semantic decl context of the decl itself.
2013-10-16 16:37:58 +02:00
Axel Naumann
3c7481a11c Not using exceptions anymore thus these now work on 32bit. 2013-10-14 17:10:55 +02:00
Vassil Vassilev
694a0e4c3f Update the CHECK-NOT clause. 2013-10-14 11:48:55 +02:00
Vassil Vassilev
389ff17151 The end of the vector varies since we do insert. 2013-10-14 10:03:55 +02:00
Vassil Vassilev
3d7b328517 Add future tests for implicit auto, when it gets fully adopted in cling.
The adoption should be done soon.
2013-10-14 09:11:40 +02:00
Vassil Vassilev
1179f9a9ec Remove the dependence between the dynamic scopes and implicit auto. 2013-10-14 09:11:40 +02:00
Vassil Vassilev
43c2ba8d0c Let the implicit auto fixer generate a decl stmt.
Usually the decls and stmts are linked-in through a DeclStmt. In the case of the
implicit auto keyword we cannot make the parser/sema generate a DeclStmt,
because it already has taken the path of parsing an expression. Instead we add
a DeclRefExpr referring the implicit auto declaration.

This DeclRefExpr is very important because it gives information where to
initialize the variable, i.e in which order. The implicit autofixer objective is
to find the first DeclRefExpr (there might be many) referring to the implicit
auto declaration and replace it with a proper DeclStmt.
2013-10-14 09:11:40 +02:00
Vassil Vassilev
499901e277 Don't try to remove the hidden decls from the lookup. 2013-10-14 09:11:40 +02:00
Vassil Vassilev
b5205ab61e Cleanup the stmt list at the logically right place. 2013-10-14 09:11:40 +02:00
Vassil Vassilev
082f3feab4 Dump the llvm::Module too. 2013-10-14 09:11:40 +02:00
Vassil Vassilev
308de089be Compare the reverse so that the newer changes appear with + in the diff. 2013-10-14 09:11:40 +02:00
Vassil Vassilev
98c6a9d5bc The compare/store state can trigger deserialization. 2013-10-14 09:11:40 +02:00
Vassil Vassilev
45e42d1156 Add timestamp to the created file. For now just HH:MM:SS. 2013-10-14 09:11:40 +02:00
Vassil Vassilev
f4fc65893c Send shutdown signal only when the ExecutionContext exists.
ExecutionContext doesn't exist in '-fsyntax-only' mode.
2013-10-14 09:11:40 +02:00
Vassil Vassilev
409324ef76 Implement shutdown action for the ExecutionContext.
When we tear down, the ExecutionContext must destroy all 'managed' addresses.
For example the LifetimeHandlers that came from the DynamicLookup. This needs
the interpreter to be in a 'sane' state, because they might call back the
Interpreter. For example gCling->execute("delete ...");
2013-10-14 09:11:39 +02:00
Vassil Vassilev
e43a6a6816 Fix broken by construction test. 2013-10-14 09:11:39 +02:00
Vassil Vassilev
14ef88e0ad Avoid double deletion of the ASTContext's external source.
This is another hack, working around the lack of multiplexing external AST source.
2013-10-14 09:11:39 +02:00
Vassil Vassilev
2af379d972 Call InitializeSema on the external sema source. 2013-10-14 09:11:39 +02:00
Vassil Vassilev
2ce823fbef We don't need -verify. 2013-10-14 09:11:39 +02:00
Vassil Vassilev
8d16dd4791 Update clang::Decl::isUsed.
CheckVariableDeclaration calls mergeVarDecl, which updates isUsed.
And if the previous wasn't used the VD's used flag gets updated to not used too.
2013-10-14 09:11:39 +02:00
Vassil Vassilev
eade01b61f Check against the new message printed out if there were differences. 2013-10-14 09:11:39 +02:00
Vassil Vassilev
a1395d0401 Revert the right cached files even when there are macros involved.
Fix the semantic of the test.
2013-10-14 09:11:39 +02:00
Vassil Vassilev
a0df2fac1d Add the -I so that Redeclarables.h can be found. 2013-10-14 09:11:39 +02:00
Vassil Vassilev
41b0539819 Don't forget to add FileCheck. 2013-10-14 09:11:39 +02:00
Vassil Vassilev
559b978279 Fix test semantics. 2013-10-14 09:11:39 +02:00
Vassil Vassilev
26eec6ab21 Now expected errors are printed out and filecheck cannot skip them. This is actually an improvement in newest llvm. In that case we don't need to run the test twice. 2013-10-14 09:11:38 +02:00
Vassil Vassilev
ffa77e6521 We cannot forward declare a function inside a function. 2013-10-14 09:11:38 +02:00
Vassil Vassilev
a9b71bb973 We should append the outfile name to the path. 2013-10-14 09:11:38 +02:00
Vassil Vassilev
6c51340d51 Implement implicit auto keyword injection in clang itself. 2013-10-14 09:11:38 +02:00
Axel Naumann
5706d4bdef Workaround broken JIT exceptions, use longjmp instead. 2013-10-03 09:54:00 +02:00
Axel Naumann
84b49183f3 Adapt to new diag format. 2013-10-03 09:54:00 +02:00
Axel Naumann
940018f1fd Reimplement NamedDecl::ClearLinkageCache(); fixes several cling tests. 2013-10-02 18:48:56 +02:00
Axel Naumann
25166d5759 Capture non-functions in caller insted of passing 0; add assert against 0. 2013-10-02 09:29:59 +02:00
Axel Naumann
3fd001fde2 Fix crash seen in ROOT-5570. 2013-10-01 16:02:57 +02:00
Axel Naumann
f5470e4942 Add llvm option library. 2013-09-30 22:55:55 +02:00
Axel Naumann
b5f85bbdf5 Update CMake for 7009e22..86c0263 2013-09-30 18:15:06 +02:00
Axel Naumann
b62b5d7937 Combine include path -D; pass src and obj for LLVMDEV/ROOT; remove unused -Ds 2013-09-30 18:09:03 +02:00
Vassil Vassilev
069a9d76c1 Remove unnecessary files that used to 'steer' the testsuite. 2013-09-27 14:33:05 +02:00
Vassil Vassilev
c31d15a1a1 Update cling's testsuite to use the newest llvm lit. 2013-09-27 14:33:04 +02:00
Axel Naumann
2bdbe82561 Resurrect C++11 build. 2013-09-27 10:02:57 +02:00
Axel Naumann
34dcd0402e Bump 2013-09-26 18:04:31 +02:00
Axel Naumann
5f767d3e98 Must now explicitly ask for auto=dependent, and explicitly unset. 2013-09-26 17:54:20 +02:00
Axel Naumann
c464f2c6fb Missing llvm:: from merge. 2013-09-26 17:54:20 +02:00
Axel Naumann
10c416332e We do not define LTDL_SHLIBPATH_VAR, just use LD_LIBRARY_PATH etc. 2013-09-26 17:54:20 +02:00
Axel Naumann
40aa591bb8 Use c_str() to enforce 0 termination. 2013-09-26 17:54:20 +02:00
Axel Naumann
2e451da58e Fix is_directory() 2013-09-26 17:54:20 +02:00
Axel Naumann
c31806dbbf SmallString needs 0 termination. 2013-09-26 17:54:19 +02:00
Axel Naumann
790c34b4f4 Change in option sort order in llvm head. 2013-09-26 17:54:19 +02:00
Axel Naumann
daf8c8281b llvm head interface changes. 2013-09-26 17:54:19 +02:00