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
Daniel Dunbar
1619831fde
clang-cc: Refactor ParseInputFollow to clearly split on the two primary cases,
...
when we are running an AST consumer and when we are just running the
preprocessor or parser alone.
llvm-svn: 86937
2009-11-12 02:53:27 +00:00
Daniel Dunbar
4806f2ea48
clang-cc: Factor ReadPCHFile out of ProcessInputFile.
...
llvm-svn: 86936
2009-11-12 02:53:20 +00:00
Daniel Dunbar
92641dca86
Simplify.
...
llvm-svn: 86935
2009-11-12 02:53:13 +00:00
Daniel Dunbar
7336edd8b2
clang-cc: Unify InitializeSourceManager calls.
...
llvm-svn: 86934
2009-11-12 02:53:06 +00:00
Daniel Dunbar
f7316732b8
clang-cc: Move non-Consumer action handling to common location, to expose the massive amount of redundancy we have introduced through blind copy-and-paste.
...
llvm-svn: 86922
2009-11-12 01:36:27 +00:00
Daniel Dunbar
f4408a29e1
Fix PCH/preprocess test to be more useful, and unbreak -E mode with implicit
...
PCH, which I broke.
llvm-svn: 86921
2009-11-12 01:36:20 +00:00
Daniel Dunbar
39b6e2a0fd
Tweak formatting.
...
llvm-svn: 86907
2009-11-12 00:24:28 +00:00
Daniel Dunbar
e6de40e747
Move AnalyzerOptions into CompilerInvocation.
...
llvm-svn: 86906
2009-11-12 00:24:10 +00:00
John Thompson
92ebab90fe
Fix clang executable path for Windows
...
llvm-svn: 86896
2009-11-11 23:11:14 +00:00
Daniel Dunbar
2856ae444b
Always initialize the header search object as part of InitializePreprocessor;
...
not doing this has little to no utility.
llvm-svn: 86883
2009-11-11 21:44:42 +00:00
Daniel Dunbar
0c6c930f05
Allow Preprocessor to take ownership of the HeaderSearch object. I think it should probably always own the header search object, but I'm not sure...
...
llvm-svn: 86882
2009-11-11 21:44:21 +00:00