Manuel Klimek
c8b3e6302f
Fix examples compile break due to rewrite of isa.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131912 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-23 18:25:41 +00:00
Manuel Klimek
81e557b1de
Pulls the common part of the clang-check example into Tooling, to allow new tools to be implemented without duplicating the boilerplate.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131425 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-16 21:33:46 +00:00
Nico Weber
a83c17c28f
Let clang-check actually use the Directory entry in the json file.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131367 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-14 21:20:23 +00:00
Manuel Klimek
da69b450b4
Fixes compilation with Visual Studio by replacing the non-standard vector::data() access.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131116 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-10 00:58:12 +00:00
Nico Weber
553e88e2ac
Fix gcc 'warning: multi-line comment'.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130583 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-30 03:13:21 +00:00
Nico Weber
1ea7b9c345
Add a Makefile to examples/Tooling for people who do not use cmake.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130577 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-30 03:03:12 +00:00
Nico Weber
e190e51722
Fix Makefile build of examples/clang-interpreter.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130576 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-30 02:52:27 +00:00
Manuel Klimek
9a05fa97df
This is the next step in building the standalone tools infrastructure:
...
This patch simplifies writing of standalone Clang tools. As an
example, we add clang-check, a tool that runs a syntax only frontend
action over a .cc file. When you integrate this into your favorite
editor, you get much faster feedback on your compilation errors, thus
reducing your feedback cycle especially when writing new code.
The tool depends on integration of an outstanding patch to CMake to
work which allows you to always have a current compile command
database in your cmake output directory when you set
CMAKE_EXPORT_COMPILE_COMMANDS.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130306 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-27 16:39:14 +00:00
John Thompson
903dec2a0d
Fixed build error.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128470 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-29 18:31:21 +00:00
Argyrios Kyrtzidis
2e471a3e47
[analyzer] Add LangOptions in CheckerManager.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126306 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-23 07:19:14 +00:00
Peter Collingbourne
4b93d660c6
Re-instate r125819 and r125820 with no functionality change
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126060 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 23:03:58 +00:00
Rafael Espindola
96b1d4b4eb
Revert 125820 and 125819 to fix PR9266.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126050 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 21:39:31 +00:00
Peter Collingbourne
906c73ffbc
Move CompilerInstance::LLVMContext and LLVMContext ownership to CodeGenAction
...
This removes the final dependency edge from any lib outside of CodeGen
to core. As a result we can, and do, trim the dependency on core
from libclang, PrintFunctionNames, the unit tests and c-index-test.
While at it, review and trim other unneeded dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125820 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 02:25:12 +00:00
Argyrios Kyrtzidis
27af04bcca
Fix the clang-wpa example.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125565 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 16:54:12 +00:00
Argyrios Kyrtzidis
e817771c57
[analyzer] Introduce libclangStaticAnalyzerFrontend and move Checkers/AnalysisConsumer.cpp into Frontend lib.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125499 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 18:13:01 +00:00
NAKAMURA Takumi
886e1606c2
CMake: LLVM_NO_RTTI must be obsolete now!
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125275 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-10 09:15:32 +00:00
Ted Kremenek
9b66371644
Split 'include/clang/StaticAnalyzer' into 'include/clang/StaticAnalyzer/Core' and 'include/clang/StaticAnalyzer/Checkers'.
...
This layout matches lib/StaticAnalyzer, which corresponds to two StaticAnalyzer libraries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125251 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-10 01:03:03 +00:00
Ted Kremenek
9a7d023625
Update clang-wpa to pass extra argument to AnalysisManager constructor.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125235 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-09 22:59:20 +00:00
Nico Weber
6d733ed9fe
make `make` work in examples/PrintFucntionNames on Mac. I checked that it still works on Linux.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124325 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-26 21:28:52 +00:00
Nick Lewycky
f7e22d8616
Fix name to match reality.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123813 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-19 05:59:39 +00:00
Ted Kremenek
8691e0ba6c
Get clang-wpa to build in TOT (reflecting updates
...
to the static analyzer).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123727 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-18 04:22:19 +00:00
Ted Kremenek
21142581d5
Chris Lattner has strong opinions about directory
...
layout. :)
Rename the 'EntoSA' directories to 'StaticAnalyzer'.
Internally we will still use the 'ento' namespace
for the analyzer engine (unless there are further
sabre rattlings...).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122514 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-23 19:38:26 +00:00
Ted Kremenek
3a8f40ed5e
Rename headers: 'clang/GR' 'clang/EntoSA' and
...
update Makefile.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122493 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-23 07:22:02 +00:00
Argyrios Kyrtzidis
d2592a34a0
[analyzer] Refactoring: Drop the 'GR' prefix.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122424 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-22 18:53:44 +00:00
Argyrios Kyrtzidis
a7af5ea88a
[analyzer] Refactoring: Move checkers into lib/GR/Checkers and their own library, libclangGRCheckers
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122422 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-22 18:52:56 +00:00
Argyrios Kyrtzidis
bce30c533a
[analyzer] Refactoring: lib/Checker -> lib/GR and libclangChecker -> libclangGRCore
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122421 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-22 18:52:29 +00:00
Argyrios Kyrtzidis
98cabbad47
[analyzer] Refactoring: include/clang/Checker -> include/clang/GR
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122420 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-22 18:51:49 +00:00
Michael J. Spencer
03013fa9a0
Merge System into Support.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120297 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-29 18:12:39 +00:00
Eli Friedman
97ab3ac088
Unbreak clang-interpreter. (Should there be some automated testing for this?)
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120069 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-24 00:32:51 +00:00
Dan Gohman
ea1924e621
Add a comment explaining why r117813 was needed.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119518 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 17:23:53 +00:00
Benjamin Kramer
aeed3da83c
Turns out that we may end up calling dladdr on GetExecutablePath, give it external linkage to make sure the lookup works on all platforms.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117813 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-30 17:32:40 +00:00
Dan Gohman
f129562b43
These functions don't need external linkage.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117733 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 22:41:35 +00:00
Tom Care
68625cf3ee
Rename 'MaxLoop' to 'MaxVisit' in AnalysisManager to more correctly reflect that we aborted analysis may not necessarily be due to a loop.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113862 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-14 21:35:27 +00:00
Michael J. Spencer
f5ddcc0aca
PrintFunctionNames: Fix Windows (MSV{S,C} and mingw) build.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113835 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-14 06:39:35 +00:00
Michael J. Spencer
560a921b85
Revert "CMake: Update to use standard CMake dependency tracking facilities instead"
...
This reverts commit r113631
Conflicts:
CMakeLists.txt
lib/CodeGen/CMakeLists.txt
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113817 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-13 23:54:41 +00:00
Michael J. Spencer
5a7f34958c
CMake: Update to use standard CMake dependency tracking facilities instead
...
of whatever we were using before...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113631 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 21:13:16 +00:00
Benjamin Kramer
f0a5d6fe7d
clang-interpreter: libFrontend depends on libSerialization. Fix linux build by changing the link order.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112187 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26 15:21:38 +00:00
Benjamin Kramer
06b901be05
Update clang-interpreter for recent DiagnosticClient ownership changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112181 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26 13:48:56 +00:00
Zhongxing Xu
579855f186
Add back clang-wpa. It is useful for experimenting with inter-file analysis.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112014 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 01:15:20 +00:00
Peter Collingbourne
07a57e0c0f
Add Serialization dependency to clang-interpreter
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111874 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 00:31:31 +00:00
Daniel Dunbar
30216ac9a9
Remove wpa 'example', it isn't being maintained.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110809 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 15:21:41 +00:00
Daniel Dunbar
f56a488a6b
Frontend: Change PluginASTAction::ParseArgs to take a CompilerInstance object
...
for use in reporting diagnostics.
- We don't want to use the Action's own CompilerInstance, because that is only
initialized during file processing and I like that invariant.
Also, if ParseArgs returns false then abandon execution.
Also, remove unused PluginASTAction::PrintHelp virtual method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110039 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-02 15:31:28 +00:00
Dan Gohman
1890eb81a6
Make a variable static.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109438 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-26 21:12:29 +00:00
Dan Gohman
b02d96bd7c
Use an export file. Plugins must export llvm::Registry symbols.
...
Also, don't link in all the clang libraries statically.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109436 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-26 21:12:10 +00:00
Peter Collingbourne
fa9fe0c62a
Fix clang-interpreter build
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109347 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24 17:59:51 +00:00
Zhongxing Xu
2ce43c8f43
Make a bunch of new data structures for the new analysis
...
engine of the new translation unit. State marshal is there but no real
work is done. End nodes are passed back.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109105 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 13:52:13 +00:00
Zhongxing Xu
c6238d2786
Reapply r108617.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108668 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 01:31:21 +00:00
Benjamin Kramer
ee30965ce9
Revert r108617, it broke the build.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108621 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 13:51:58 +00:00
Zhongxing Xu
69b81941aa
Prepare the analyzer for the callee in another translation unit:
...
Let AnalysisContext contain a TranslationUnit.
Let CallEnter refer to an AnalysisContext instead of a FunctionDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108617 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 11:12:42 +00:00
Nick Lewycky
5ac7b29416
PrintFunctionNames is a plugin, it should pull in symbols from the clang binary
...
that loads it, not by linking against them directly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108055 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-10 20:24:23 +00:00