Peter Collingbourne
e26198c098
Adjust CLANG_BUILD_EXAMPLES to mean whether the examples are built
...
by default, rather than whether they may be built at all.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149037 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-26 03:33:40 +00:00
Dylan Noblesmith
1770e0dadc
remove unneeded config.h includes
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147195 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-22 22:49:47 +00:00
Dylan Noblesmith
3a89e37021
examples: flesh out PFN readme
...
Show how to actually use the arguments it has.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146845 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-18 11:30:53 +00:00
Douglas Gregor
1a026803b7
Update signature of HandleTopLevelDecl.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145001 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-19 19:22:13 +00:00
Sebastian Pop
5d8b954842
rename getHostTriple into getDefaultTargetTriple in clang
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143503 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 21:33:06 +00:00
Peter Collingbourne
22a7dfea58
Add support for lazily linking bitcode files (using a new
...
-mlink-bitcode-file flag), and more generally llvm::Modules, before
running optimisations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143314 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-30 17:30:44 +00:00
Eli Friedman
17e279405e
Add missing include to clang-interpreter example, to make it work on Windows. Patch by Dean Pavlekovic.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141324 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-06 22:24:13 +00:00
Bob Wilson
10a82cde7c
Rip out flags for controlling C++ "production mode" separately.
...
This is old leftover cruft from the days when C++ was not yet ready
for prime time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141063 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-04 05:34:14 +00:00
Eli Friedman
d3c1661593
Fix examples for r140478. PR11021.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140618 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-27 18:33:47 +00:00
Evan Cheng
a6b4045dc4
Match LLVM change: TargetRegistry and TargetSelect have been moved to Support.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138451 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-24 18:09:14 +00:00
Anna Zaks
e172e8b9e7
Remove EnhancedBugReport and RangedBugReport - pull all the extra functionality they provided into their parent BugReport. The only functional changes are: made getRanges() non const - it adds default range to Ranges if none are supplied, made getStmt() private, which was another FIXME.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137894 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17 23:00:25 +00:00
Jordy Rose
26fb4cbaef
Don't use BuiltinBug in analyzer plugin example.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137811 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17 03:23:51 +00:00
Jordy Rose
77a33a7170
[analyzer] Add basic support for pluggable checkers.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137802 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17 01:30:59 +00:00
Manuel Klimek
16f213142f
Reverts the Tooling changes as requested by Chris.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132462 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-02 16:58:33 +00:00
Manuel Klimek
d06f59833a
Fixes Makefile based build for examples/Tooling.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132380 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-01 01:21:01 +00:00
Nick Lewycky
3eada1e29a
Put Parse before Sema on the link line since parse depends on sema.
...
Also reflow these lines to fit in 80-col.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132379 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-01 00:59:36 +00:00
Manuel Klimek
64cbdf3709
This patch implements an AST matching framework that allows to write
...
tools that match on the C++ ASTs. The main interface is in ASTMatchers.h,
an example implementation of a tool that removes redundant .c_str() calls
is in the example RemoveCStrCalls.cpp.
Various contributions:
Zhanyong Wan, Chandler Carruth, Marcin Kowalczyk, Wei Xu, James Dennett.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132374 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-31 23:49:32 +00:00
Zhongxing Xu
426fd36db3
Fix linking of clang-wpa.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132329 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-31 07:13:36 +00:00
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