Ted Kremenek
4c4d643b6e
Have clang_getCursorSource() return NULL when the source location is invalid or refers to a built-in buffer. Implements <rdar://problem/7296243>.
...
llvm-svn: 89044
2009-11-17 05:31:58 +00:00
Daniel Dunbar
19b04fff34
Move InitializeAnalyzerOptions for consistency.
...
llvm-svn: 89040
2009-11-17 05:05:08 +00:00
Daniel Dunbar
8870e97dc6
Remove unused NoPreprocess variable.
...
llvm-svn: 89039
2009-11-17 05:04:57 +00:00
Daniel Dunbar
92881dbe73
Remove unused IsCXXAware and IgnoreSysRoots option from HeaderSearchOptions::Entry.
...
llvm-svn: 89035
2009-11-17 05:04:15 +00:00
Daniel Dunbar
2cbf4a7d6e
Trim includes.
...
llvm-svn: 88982
2009-11-16 22:38:48 +00:00
Daniel Dunbar
24347f7cda
Store more information in HeaderSearchOptions so that its initialization is not
...
language dependent.
llvm-svn: 88981
2009-11-16 22:38:40 +00:00
Daniel Dunbar
77a9d2b3ec
clang-cc: Eliminate cyclic dependency in initializing CodeGenOptions.
...
llvm-svn: 88980
2009-11-16 22:38:14 +00:00
Daniel Dunbar
b9bbd54fdb
Add TargetOptions and use it when constructing targets.
...
- This ended up being hard to factor, sorry for the large diff.
- Some post-commit cleanup to come.
llvm-svn: 88833
2009-11-15 06:48:46 +00:00
Daniel Dunbar
9b30eb721f
Add examples dir, built with BUILD_EXAMPLES=1 (Makefiles, no CMake equivalent yet).
...
Move tools/wpa to examples/wpa, and unbreak its build.
llvm-svn: 88825
2009-11-15 00:22:33 +00:00
Daniel Dunbar
d392dd0709
Add pluggable action support to clang-cc, via -plugin command line option.
...
- Expects the plugin has been loaded with -load.
- Using this may require disabling TOOL_NO_EXPORTS in the clang-cc Makefile, this breaks the llvm::Registry way of working (static constructors are bad, kids). This should be replaced with a "real" plugin model that has explicit plugin interfaces.
llvm-svn: 88824
2009-11-15 00:12:04 +00:00
Daniel Dunbar
7fbd42f08a
Move the program action enum to FrontendOptions.
...
--
ddunbar@giles:clang-cc (master)$ grep llvm:🆑 :opt clang-cc.cpp # Woot
ddunbar@giles:clang-cc (master)$
--
llvm-svn: 88820
2009-11-14 22:32:38 +00:00
Daniel Dunbar
ea956ddf0b
clang-cc: Switch to using FrontendAction. Whee.
...
Please report any discrepancies you see in clang-cc, I'm not confident that our regression tests cover all the fun ways one can use clang-cc.
llvm-svn: 88776
2009-11-14 10:53:49 +00:00
Daniel Dunbar
409e890f8d
Add CompilerInstance::InitializeSourceManager.
...
llvm-svn: 88764
2009-11-14 07:53:04 +00:00
Daniel Dunbar
10563ea92e
Turn -fixit it back into a mode, but make -fixit-at imply that mode this time
...
(instead of running it with arbitrary consumers).
- Also, turn any -fixit-at lookup failure into an error.
llvm-svn: 88757
2009-11-14 04:39:29 +00:00
Daniel Dunbar
50ec0da0e1
Switch -verify implementation to use VerifyDiagnosticClient.
...
- Not tested, but -verify with multiple inputs should work now.
llvm-svn: 88750
2009-11-14 03:24:39 +00:00
Daniel Dunbar
e598a56d30
Pass Preprocessor through DiagnosticClient::BeginSourceFile.
...
llvm-svn: 88744
2009-11-14 02:48:04 +00:00
Ted Kremenek
4ef13f8ac9
Add clang-cc option "--analyzer-experimental-internal-checks". This
...
option enables new "internal" checks that will eventually be turned on
by default but still require broader testing.
llvm-svn: 88671
2009-11-13 18:46:29 +00:00
Daniel Dunbar
420b0f1bd8
Add CompilerInstance utility functions for creating output files.
...
llvm-svn: 88667
2009-11-13 18:32:08 +00:00
Daniel Dunbar
566eeb2da5
Add output file list to CompilerInstance, so that it can track them instead of
...
forcing all clients to do it.
llvm-svn: 87103
2009-11-13 10:37:48 +00:00
Daniel Dunbar
ac28c38737
clang-cc: Move output file initialization closer to use.
...
llvm-svn: 87102
2009-11-13 10:18:59 +00:00
Daniel Dunbar
39991862e1
Simplify, in anticipation of introducing explicit action instances.
...
llvm-svn: 87101
2009-11-13 09:57:06 +00:00
Daniel Dunbar
f7093b5ae8
Add CodeCompletion consumer to CompilerInvocation.
...
llvm-svn: 87100
2009-11-13 09:36:05 +00:00
Daniel Dunbar
242ea9a05a
Rework Sema code completion interface.
...
- Provide Sema in callbacks, instead of requiring it in constructor. This
eliminates the need for a factory function. Clients now just pass the object
to consume the results in directly.
- CodeCompleteConsumer is cheap to construct, so building it whenever we are
doing code completion is reasonable.
Doug, please review.
llvm-svn: 87099
2009-11-13 08:58:20 +00:00
Daniel Dunbar
599313ef94
Add CompilerInstance::createPCHExternalASTSource.
...
llvm-svn: 87097
2009-11-13 08:21:10 +00:00
Daniel Dunbar
adf6c242a0
Add CompilerInstance::has* methods for testing if the instance has a particular
...
subobject.
llvm-svn: 87096
2009-11-13 08:20:57 +00:00
Daniel Dunbar
df3e30c41c
Add ASTContext to CompilerInstance.
...
llvm-svn: 87095
2009-11-13 08:20:47 +00:00
Daniel Dunbar
7d75afc56a
Add CompilerInstance::createDiagnostics, and move clang-cc to it.
...
clang-cc.cpp is now under 1k lines, if anyone is counting.
llvm-svn: 87090
2009-11-13 05:52:34 +00:00
Daniel Dunbar
210a80086b
Add a FIXME.
...
llvm-svn: 87089
2009-11-13 05:52:19 +00:00
Daniel Dunbar
aaa148fd36
Add Preprocessor to CompilerInstance, and move clang-cc CreatePreprocessor to
...
CompilerInstance::createPreprocessor.
llvm-svn: 87088
2009-11-13 05:52:11 +00:00
Daniel Dunbar
1b4441915a
Wherein the TargetInfo argument to Preprocessor is made 'const' and propogated.
...
llvm-svn: 87087
2009-11-13 05:51:54 +00:00
Daniel Dunbar
546a676ae5
Add {File,Source}Manager to CompilerInstance.
...
llvm-svn: 87079
2009-11-13 04:12:06 +00:00
Daniel Dunbar
636404a330
Add CompilerInstance, and starting moving clang-cc to it.
...
- The design philosophy is in the CompilerInstance doxyment, if you don't agree
with it now would be a good time to speak up.
llvm-svn: 87078
2009-11-13 03:51:44 +00:00
Daniel Dunbar
27b19dc1b5
Move input kind identification (-x) into FrontendOptions.
...
llvm-svn: 87066
2009-11-13 02:06:12 +00:00
Ted Kremenek
aedb7434c8
Add clang-cc option "-analyzer-experimental-checks" to enable experimental path-sensitive checks. The idea is to separate "barely working" or "skunkworks" checks from ones that should always run. Later we need more fine-grain checker control.
...
llvm-svn: 87053
2009-11-13 01:15:47 +00:00
Daniel Dunbar
1e886ebe8c
Move -target-{triple,abi} options into FrontendOptions.
...
llvm-svn: 87051
2009-11-13 01:02:19 +00:00
Daniel Dunbar
4a1f60f777
Move code completion options to clang-cc
...
llvm-svn: 87050
2009-11-13 01:02:10 +00:00
Daniel Dunbar
a5c3d989fb
Move FixItAtLocations into FrontendOptions
...
llvm-svn: 87046
2009-11-12 23:52:56 +00:00
Daniel Dunbar
eb51586a85
clang-cc: Keep Verbose option with HeaderSearchOptions, for now.
...
llvm-svn: 87045
2009-11-12 23:52:46 +00:00
Daniel Dunbar
f996c05d74
Add FrontendOptions, and starting moving clang-cc to it.
...
llvm-svn: 87044
2009-11-12 23:52:32 +00:00
Chandler Carruth
bc55fe26c6
Move CompileOptions -> CodeGenOptions, and sink it into the CodeGen library.
...
This resolves the layering violation where CodeGen depended on Frontend.
llvm-svn: 86998
2009-11-12 17:24:48 +00:00
Daniel Dunbar
068ae76e02
Disallow FIX-ITs when generating code.
...
llvm-svn: 86990
2009-11-12 15:42:53 +00:00
Daniel Dunbar
91cd960d50
clang-cc: Coalesce frontend options further.
...
llvm-svn: 86988
2009-11-12 15:23:20 +00:00
Daniel Dunbar
4c0e8274e9
Move warning options into DiagnosticOptions.
...
llvm-svn: 86968
2009-11-12 07:28:44 +00:00
Daniel Dunbar
8fd69a09cc
Move dump-build-information option into DiagnosticOptions.
...
llvm-svn: 86966
2009-11-12 07:28:21 +00:00
Daniel Dunbar
ec256a921f
clang-cc: Factor CreateDiagnosticEngine out of main.
...
llvm-svn: 86963
2009-11-12 06:48:31 +00:00
Daniel Dunbar
0d1defd4cd
clang-cc: -fixit is actually option, not an action, although its use with non
...
-fsyntax-only is probably untested.
llvm-svn: 86962
2009-11-12 06:48:24 +00:00
Daniel Dunbar
723e74ab75
Simplify.
...
llvm-svn: 86961
2009-11-12 06:48:17 +00:00
Daniel Dunbar
2940303363
Move TokenCache option to PreprocessorOptions.
...
llvm-svn: 86940
2009-11-12 02:53:59 +00:00
Daniel Dunbar
1a54e3fbb9
Switch PTHManager to using diagnostics for most errors.
...
Also, always give errors on a token-cache PTH failure.
llvm-svn: 86939
2009-11-12 02:53:48 +00:00
Daniel Dunbar
51637a9ba4
Simplify.
...
llvm-svn: 86938
2009-11-12 02:53:34 +00:00