Commit Graph

119 Commits

Author SHA1 Message Date
Chandler Carruth 28969b4139 Remove a goofy CMake hack and use the standard CMake facilities to
express library-level dependencies within Clang.

This is no more verbose really, and plays nicer with the rest of the
CMake facilities. It should also have no change in functionality.

llvm-svn: 158888
2012-06-21 01:30:21 +00:00
Peter Collingbourne 9251b7d873 Honour CLANG_BUILD_EXAMPLES correctly, by setting the directory's
EXCLUDE_FROM_ALL property.

llvm-svn: 156090
2012-05-03 19:11:45 +00:00
Manuel Klimek 34e0f6cba2 Reverted unintentional commit.
llvm-svn: 155629
2012-04-26 08:46:12 +00:00
Manuel Klimek c01d3fbe0f Adds a small tutorial on how to write RAV based ASTFrontendActions.
llvm-svn: 155627
2012-04-26 08:35:39 +00:00
Douglas Gregor 11f91b9fe7 Remove clangIndex reference from clang-interpreter CMake build
llvm-svn: 154674
2012-04-13 17:22:46 +00:00
NAKAMURA Takumi a4917fade7 clang-interpreter/Makefile: [PR12313] Update USEDLIBS to add clangEdit.
llvm-svn: 153167
2012-03-21 06:25:42 +00:00
Douglas Gregor d23e333bf6 Remove clang-wpa example, which has been unmaintained for quite a while.
llvm-svn: 152729
2012-03-14 17:29:44 +00:00
David Blaikie bbafb8a745 Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

llvm-svn: 152536
2012-03-11 07:00:24 +00:00
Anna Zaks fc5dfe9f7c [analyzer] Rename clang::CallGraph into clang::idx::CallGraph + rename
the corresponding files to avoid confusion.

This is a preparation to adding an AST-based call graph to Analysis. The
existing call graph works with indexer entries. We might be able to
refactor it to use the AST based graph in the future.

(Minimal testing here as the only example that uses the API has been
completely broken, does not compile.)

llvm-svn: 151950
2012-03-02 22:54:36 +00:00
Dylan Noblesmith c95d81924d Basic: import IntrusiveRefCntPtr<> into clang namespace
The class name is long enough without the llvm:: added.
Also bring in RefCountedBase and RefCountedBaseVPTR.

llvm-svn: 150958
2012-02-20 14:00:23 +00:00
Dylan Noblesmith f1a13f29f2 drop more llvm:: prefixes on SmallString<>
More cleanup after r149799.

llvm-svn: 150380
2012-02-13 12:32:26 +00:00
Dylan Noblesmith 1cd1069b68 drop more llvm:: prefixes on OwningPtr<>
More cleanup after r149798.

llvm-svn: 150379
2012-02-13 12:32:21 +00:00
Dylan Noblesmith 01b2c9e82f examples/analyzer-plugin: hook up to build
This was never being compiled at all and was bitrotting
as a result.

Also compile SampleAnalyzerPlugin as a module, not a library,
and fix a mistake with not passing the source files
to add_clang_library().

llvm-svn: 150378
2012-02-13 12:32:15 +00:00
Dylan Noblesmith aa1a64055b examples/analyzer-plugin/: unbreak build
It was never updated for API changes in r149311/r149336/r149339
and r147688.

llvm-svn: 150202
2012-02-09 20:02:49 +00:00
Peter Collingbourne 53860cfeb0 Adjust CLANG_BUILD_EXAMPLES to mean whether the examples are built
by default, rather than whether they may be built at all.

llvm-svn: 149037
2012-01-26 03:33:40 +00:00
Dylan Noblesmith 1ced737ebf remove unneeded config.h includes
llvm-svn: 147195
2011-12-22 22:49:47 +00:00
Dylan Noblesmith 4cde694855 examples: flesh out PFN readme
Show how to actually use the arguments it has.

llvm-svn: 146845
2011-12-18 11:30:53 +00:00
Douglas Gregor 9f39a765e2 Update signature of HandleTopLevelDecl.
llvm-svn: 145001
2011-11-19 19:22:13 +00:00
Sebastian Pop 8188c8a1f3 rename getHostTriple into getDefaultTargetTriple in clang
llvm-svn: 143503
2011-11-01 21:33:06 +00:00
Peter Collingbourne f1d76db466 Add support for lazily linking bitcode files (using a new
-mlink-bitcode-file flag), and more generally llvm::Modules, before
running optimisations.

llvm-svn: 143314
2011-10-30 17:30:44 +00:00
Eli Friedman 4e84e46b7b Add missing include to clang-interpreter example, to make it work on Windows. Patch by Dean Pavlekovic.
llvm-svn: 141324
2011-10-06 22:24:13 +00:00
Bob Wilson 05de0298d2 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.

llvm-svn: 141063
2011-10-04 05:34:14 +00:00
Eli Friedman f42db7ce48 Fix examples for r140478. PR11021.
llvm-svn: 140618
2011-09-27 18:33:47 +00:00
Evan Cheng 494eb062b5 Match LLVM change: TargetRegistry and TargetSelect have been moved to Support.
llvm-svn: 138451
2011-08-24 18:09:14 +00:00
Anna Zaks 3a6bdf8f82 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.
llvm-svn: 137894
2011-08-17 23:00:25 +00:00
Jordy Rose ae55cf2f90 Don't use BuiltinBug in analyzer plugin example.
llvm-svn: 137811
2011-08-17 03:23:51 +00:00
Jordy Rose 93b86e494d [analyzer] Add basic support for pluggable checkers.
llvm-svn: 137802
2011-08-17 01:30:59 +00:00
Manuel Klimek 8a160cc42b Reverts the Tooling changes as requested by Chris.
llvm-svn: 132462
2011-06-02 16:58:33 +00:00
Manuel Klimek 9978c4f730 Fixes Makefile based build for examples/Tooling.
llvm-svn: 132380
2011-06-01 01:21:01 +00:00
Nick Lewycky 15cf577ff9 Put Parse before Sema on the link line since parse depends on sema.
Also reflow these lines to fit in 80-col.

llvm-svn: 132379
2011-06-01 00:59:36 +00:00
Manuel Klimek 0cfc6a045c 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.

llvm-svn: 132374
2011-05-31 23:49:32 +00:00
Zhongxing Xu e6a2028fe1 Fix linking of clang-wpa.
llvm-svn: 132329
2011-05-31 07:13:36 +00:00
Manuel Klimek b66b5cef00 Fix examples compile break due to rewrite of isa.
llvm-svn: 131912
2011-05-23 18:25:41 +00:00
Manuel Klimek c9675152b3 Pulls the common part of the clang-check example into Tooling, to allow new tools to be implemented without duplicating the boilerplate.
llvm-svn: 131425
2011-05-16 21:33:46 +00:00
Nico Weber 1eace078a4 Let clang-check actually use the Directory entry in the json file.
llvm-svn: 131367
2011-05-14 21:20:23 +00:00
Manuel Klimek ffecc6b9c2 Fixes compilation with Visual Studio by replacing the non-standard vector::data() access.
llvm-svn: 131116
2011-05-10 00:58:12 +00:00
Nico Weber 1f41ab05f5 Fix gcc 'warning: multi-line comment'.
llvm-svn: 130583
2011-04-30 03:13:21 +00:00
Nico Weber 1bb8e09c37 Add a Makefile to examples/Tooling for people who do not use cmake.
llvm-svn: 130577
2011-04-30 03:03:12 +00:00
Nico Weber 347339f790 Fix Makefile build of examples/clang-interpreter.
llvm-svn: 130576
2011-04-30 02:52:27 +00:00
Manuel Klimek 6825eebcd6 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.

llvm-svn: 130306
2011-04-27 16:39:14 +00:00
John Thompson f71173043f Fixed build error.
llvm-svn: 128470
2011-03-29 18:31:21 +00:00
Argyrios Kyrtzidis 99ea46462a [analyzer] Add LangOptions in CheckerManager.
llvm-svn: 126306
2011-02-23 07:19:14 +00:00
Peter Collingbourne 8f5cf74c77 Re-instate r125819 and r125820 with no functionality change
llvm-svn: 126060
2011-02-19 23:03:58 +00:00
Rafael Espindola a6d2bff0c5 Revert 125820 and 125819 to fix PR9266.
llvm-svn: 126050
2011-02-19 21:39:31 +00:00
Peter Collingbourne 14a552b2d7 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.

llvm-svn: 125820
2011-02-18 02:25:12 +00:00
Argyrios Kyrtzidis 6fa0d20a6f Fix the clang-wpa example.
llvm-svn: 125565
2011-02-15 16:54:12 +00:00
Argyrios Kyrtzidis ecd3334dac [analyzer] Introduce libclangStaticAnalyzerFrontend and move Checkers/AnalysisConsumer.cpp into Frontend lib.
llvm-svn: 125499
2011-02-14 18:13:01 +00:00
NAKAMURA Takumi 98dd73d66c CMake: LLVM_NO_RTTI must be obsolete now!
llvm-svn: 125275
2011-02-10 09:15:32 +00:00
Ted Kremenek f8cbac4b91 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.

llvm-svn: 125251
2011-02-10 01:03:03 +00:00
Ted Kremenek 0bc2855aa9 Update clang-wpa to pass extra argument to AnalysisManager constructor.
llvm-svn: 125235
2011-02-09 22:59:20 +00:00