Граф коммитов

124 Коммитов

Автор SHA1 Сообщение Дата
Rafael Espindola 9d8b5fc45e Fix examples.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168705 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-27 16:16:02 +00:00
NAKAMURA Takumi 5b4379fafe analyzer-plugin/MainCallChecker.cpp: Fixup corresponding to r167275.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167278 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-02 02:04:01 +00:00
Douglas Gregor 35d516cf1a Update clang-interpreter example
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166510 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 22:36:49 +00:00
Ted Kremenek 305c613af6 Split library clangRewrite into clangRewriteCore and clangRewriteFrontend.
This is similar to how we divide up the StaticAnalyzer libraries to separate
core functionality to what is clearly associated with Frontend actions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163050 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-01 05:09:24 +00:00
NAKAMURA Takumi 3eb3755949 libclang, examples: [CMake] Add dependencies to tblgen'd headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160849 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-27 06:17:56 +00:00
Chandler Carruth b0d8671f95 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158888 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 01:30:21 +00:00
Peter Collingbourne b0998f9b5b Honour CLANG_BUILD_EXAMPLES correctly, by setting the directory's
EXCLUDE_FROM_ALL property.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156090 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-03 19:11:45 +00:00
Manuel Klimek 981d1ec3fd Reverted unintentional commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155629 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-26 08:46:12 +00:00
Manuel Klimek d9ed0fd0d1 Adds a small tutorial on how to write RAV based ASTFrontendActions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155627 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-26 08:35:39 +00:00
Douglas Gregor 30828467c0 Remove clangIndex reference from clang-interpreter CMake build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154674 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-13 17:22:46 +00:00
NAKAMURA Takumi 247c719652 clang-interpreter/Makefile: [PR12313] Update USEDLIBS to add clangEdit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153167 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-21 06:25:42 +00:00
Douglas Gregor 72ff6bb6f6 Remove clang-wpa example, which has been unmaintained for quite a while.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152729 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-14 17:29:44 +00:00
David Blaikie 4e4d08403c 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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-11 07:00:24 +00:00
Anna Zaks 190f6003cb [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.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151950 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-02 22:54:36 +00:00
Dylan Noblesmith c93dc78896 Basic: import IntrusiveRefCntPtr<> into clang namespace
The class name is long enough without the llvm:: added.
Also bring in RefCountedBase and RefCountedBaseVPTR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150958 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 14:00:23 +00:00
Dylan Noblesmith 36d592718f drop more llvm:: prefixes on SmallString<>
More cleanup after r149799.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150380 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 12:32:26 +00:00
Dylan Noblesmith 1e4c01b792 drop more llvm:: prefixes on OwningPtr<>
More cleanup after r149798.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150379 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 12:32:21 +00:00
Dylan Noblesmith 89446751f1 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().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150378 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 12:32:15 +00:00
Dylan Noblesmith 8f79e3f571 examples/analyzer-plugin/: unbreak build
It was never updated for API changes in r149311/r149336/r149339
and r147688.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150202 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-09 20:02:49 +00:00
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