David Greene
af8ee2cdee
Unconstify Inits
...
Remove const qualifiers from Init references, per Chris' request.
llvm-svn: 136531
2011-07-29 22:43:06 +00:00
David Greene
1aa0e3e118
[AVX] Constify Inits
...
Make references to Inits const everywhere. This is the final step
before making them unique.
llvm-svn: 136485
2011-07-29 19:07:05 +00:00
Eric Christopher
71520a867d
Revert r134921, 134917, 134908 and 134907. They're causing failures
...
in multiple buildbots.
llvm-svn: 134936
2011-07-11 23:06:52 +00:00
David Greene
af973b4f36
[AVX] Make Inits Foldable
...
Manage Inits in a FoldingSet. This provides several benefits:
- Memory for Inits is properly managed
- Duplicate Inits are folded into Flyweights, saving memory
- It enforces const-correctness, protecting against certain classes
of bugs
The above benefits allow Inits to be used in more contexts, which in
turn provides more dynamism to TableGen. This enhanced capability
will be used by the AVX code generator to a fold common patterns
together.
llvm-svn: 134907
2011-07-11 18:25:51 +00:00
John McCall
7cfd1cfa86
Update the Clang diagnostic emitter to emit IDs for diagnostic categories.
...
Patch by Argyrios Kyrtzidis.
llvm-svn: 133093
2011-06-15 21:43:52 +00:00
Argyrios Kyrtzidis
0246d63715
[tablegen] A couple of changes to ClangDiagnosticEmmitter.
...
-Emit an empty warning option as string ("") instead of 0.
-For diagnostic names also emit the size of the string.
llvm-svn: 132046
2011-05-25 05:04:22 +00:00
Jay Foad
1a180156b6
Remove unused STL header includes.
...
llvm-svn: 130068
2011-04-23 19:53:52 +00:00
Douglas Gregor
f29216072e
Initial work to improve documentation for Clang's diagnostics, from Matthieu Monrocq
...
llvm-svn: 129613
2011-04-15 22:04:07 +00:00
Argyrios Kyrtzidis
9f5055f037
Wrap the struct in an anonymous namespace.
...
llvm-svn: 125452
2011-02-13 07:51:19 +00:00
Douglas Gregor
dd02d62594
Clang: separate the access-control diagnostics from other diagnostics that do not have SFINAE behavior.
...
llvm-svn: 124440
2011-01-27 21:06:17 +00:00
Chris Lattner
77d369c8eb
eliminate the Records global variable, patch by Garrison Venn!
...
llvm-svn: 121659
2010-12-13 00:23:57 +00:00
Chris Lattner
76b3de92f2
diaggroup categories should take precedence over diag-specific groups.
...
llvm-svn: 104567
2010-05-24 21:55:47 +00:00
Chandler Carruth
89e5635a7c
Update tablegen to generate shorts instead of chars for subgroup arrays.
...
llvm-svn: 103704
2010-05-13 07:43:47 +00:00
Chris Lattner
b3d221964b
add the ability to associate 'category' names with clang diagnostics
...
and diagnostic groups. This allows the compiler to group
diagnostics together (e.g. "Logic Warning",
"Format String Warning", etc) like the static analyzer does.
This is not exposed through anything in the compiler yet.
llvm-svn: 103050
2010-05-04 20:44:23 +00:00
Kovarththanan Rajaratnam
dae75defc8
Add an extra newline to separate PP directives from the contents
...
llvm-svn: 98820
2010-03-18 13:16:38 +00:00
Daniel Dunbar
8eff29d805
Use raw_ostream::write_escaped instead of EscapeString.
...
llvm-svn: 84356
2009-10-17 20:43:19 +00:00
Daniel Dunbar
38a22bffdc
Replace std::iostreams with raw_ostream in TableGen.
...
- Sorry, I can't help myself.
- No intended functionality change.
llvm-svn: 74742
2009-07-03 00:10:29 +00:00
Douglas Gregor
ec131d1fd7
Add output of the SFINAE bit for Clang's diagnostics
...
llvm-svn: 73331
2009-06-14 07:24:49 +00:00
Chris Lattner
cce520f884
prove diagnostic -> group mapping information.
...
llvm-svn: 69270
2009-04-16 05:52:18 +00:00
Chris Lattner
1e86593b6a
encode subgroups into the clang .inc file. -Wall now works!
...
llvm-svn: 69257
2009-04-16 03:16:12 +00:00
Chris Lattner
13507d6cba
start producing subgroup info.
...
llvm-svn: 69249
2009-04-16 00:53:25 +00:00
Chris Lattner
4816a3488f
make sure that empty diag groups get known by clang.
...
llvm-svn: 69235
2009-04-15 22:33:02 +00:00
Chris Lattner
bcba418569
implement support for writing out diagnostic group tables.
...
llvm-svn: 69219
2009-04-15 20:55:08 +00:00
Chris Lattner
e05d99f604
use UppercaseString instead of EmitAllCaps
...
llvm-svn: 69213
2009-04-15 20:16:12 +00:00
Chris Lattner
3983dfdc83
use escape string.
...
llvm-svn: 69212
2009-04-15 20:13:18 +00:00
Chris Lattner
c2ac800cd7
rename -gen-clang-diags-options -> -gen-clang-diag-groups
...
llvm-svn: 69208
2009-04-15 20:02:32 +00:00
Chris Lattner
06a7f37265
don't infer diag class from parenting relations, make it an explicit field
...
in the record.
llvm-svn: 69176
2009-04-15 16:55:46 +00:00
Chris Lattner
4e7b579ecc
include the default mapping in the clang diagnostic .inc files.
...
llvm-svn: 69173
2009-04-15 16:43:18 +00:00
Chris Lattner
3dfaeeaefc
minor cleanups
...
llvm-svn: 69152
2009-04-15 06:26:49 +00:00
Ted Kremenek
061cf25072
Constify method to make VC++ happy. Patch by Brian Diekelman!
...
llvm-svn: 68222
2009-04-01 18:24:22 +00:00
Jim Grosbach
975c1cb41a
fix a few spelling errors and typos
...
llvm-svn: 67758
2009-03-26 16:17:51 +00:00
Ted Kremenek
c8e54db801
Add sanity check in Clang TableGen backend to check if 'Component' is a string.
...
llvm-svn: 67565
2009-03-23 21:54:33 +00:00
Ted Kremenek
dd03b5bb63
Fix regression in 'tblgen -gen-clang-diags-defs': Emit the diagnostic kind instead of "DIAGNOSTICCONTROLLED".
...
llvm-svn: 67305
2009-03-19 17:18:09 +00:00
Ted Kremenek
4724b8262f
tblgen -gen-clang-diags-options: Output OptionTable entries in lexicographic
...
order.
llvm-svn: 67244
2009-03-18 21:36:46 +00:00
Ted Kremenek
bf76c6d971
'tblgen -gen-clang-diags-options' now outputs the OptionTable:
...
static const WarningOption OptionTable[] = {
{"unused-macros", DIAGS(UnusedMacrosDiags)}
...
};
This table is not yet properly sorted.
llvm-svn: 67242
2009-03-18 21:28:47 +00:00
Ted Kremenek
4a330b7ec1
Add another Clang TableGen-backend (-gen-clang-diags-options) for emitting
...
declarations for controlling groups of warnings. Currently this transforms:
def UnusedMacrosDiags : Option<"unused-macros", [pp_macro_not_used]>;
into:
static const diag::kind UnusedMacrosDiags[] = { diag::pp_macro_not_used };
llvm-svn: 67239
2009-03-18 21:16:16 +00:00
Ted Kremenek
9750429e61
Add (hidden) TableGen command option '-clang-component' which specifies the
...
component's warnings to process for '-gen-clang-diags-defs'.
Also, when the component is specified, generate a '#if' prologue at the top of
the generated .def file (to match the current files).
llvm-svn: 66975
2009-03-13 22:53:41 +00:00
Ted Kremenek
dee115697b
Add initial implementation of a TableGen backend for converting Clang-warnings
...
tablegen files to the original .def preprocessor include files. This is my first
TableGen backend; I don't claim that it is awesome.
llvm-svn: 66971
2009-03-13 22:21:17 +00:00