Alexis Hunt
7b28cdb3da
Improve the specification of spellings in Attr.td.
...
Note that this is mostly a structural patch that handles the change from the old
spelling style to the new one. One consequence of this is that all AT_foo_bar
enum values have changed to not be based off of the first spelling, but rather
off of the class name, so they are now AT_FooBar and the like (a straw poll on
IRC showed support for this). Apologies for code churn.
Most attributes have GNU spellings as a temporary solution until everything else
is sorted out (such as a Keyword spelling, which I intend to add if someone else
doesn't beat me to it). This is definitely a WIP.
I've also killed BaseCheckAttr since it was unused, and I had to go through
every attribute anyway.
llvm-svn: 158700
2012-06-19 03:39:03 +00:00
Alexis Hunt
a0e54d453b
Handle C++11 attribute namespaces automatically.
...
Now, as long as the 'Namespaces' variable is correct inside Attr.td, the
generated code will correctly admit a C++11 attribute only when it has the
appropriate namespace(s).
llvm-svn: 158661
2012-06-18 16:13:52 +00:00
Jakob Stoklund Olesen
995e0e13fa
Make clang-tblgen backends functions instead of TableGenBackends.
...
Get rid of a bunch of header files. TableGen output should be unaffected.
Patch by Sean Silva!
llvm-svn: 158388
2012-06-13 05:12:41 +00:00
Anna Zaks
d60367b893
[analyzer] Use "issue hash" in CmpRuns; followup on r158180
...
(For the future: It would be more efficient to produce a hash key with
the embedded function info inside the compiler.)
llvm-svn: 158187
2012-06-08 01:50:49 +00:00
Douglas Gregor
cb8cf4916f
Minor comments and changes to clang-completion-mode.el, from David Wood!
...
llvm-svn: 158174
2012-06-07 22:33:29 +00:00
Jordan Rose
dc191a184f
[analyzer] SATestBuild should execute SVN updates even if Verbose is off.
...
Also, re-use glob results when looking for failure logs.
llvm-svn: 157817
2012-06-01 16:24:43 +00:00
Jordan Rose
01ac57244c
[analyzer] Fix SATestAdd to work with SATestBuild.
...
Also, eliminate global 'IsReferenceBuild' in SATestBuild. It doesn't get
passed around that much.
llvm-svn: 157816
2012-06-01 16:24:38 +00:00
Aaron Ballman
f4f486f732
Updating the visualizers to include more datatypes. Patch thanks to Jay Blanchard.
...
llvm-svn: 157763
2012-05-31 19:27:30 +00:00
Jim Grosbach
6acd46f5e9
TableGen: Remove extraneous '\' at EOL in generated tests.
...
llvm-svn: 157700
2012-05-30 18:18:29 +00:00
Ted Kremenek
f5958eb2b4
Fix typo.
...
llvm-svn: 157229
2012-05-22 00:54:40 +00:00
Ted Kremenek
c53ed2e158
Use Perl prototypes instead of shift.
...
llvm-svn: 157228
2012-05-22 00:52:49 +00:00
Ted Kremenek
2fe1ed3e0d
Add basic delta-debugging script used for reducing analyzer crasher test cases.
...
llvm-svn: 157219
2012-05-21 23:29:01 +00:00
David Blaikie
1f05227a3d
SmallString Visual Studio visualizer by Will Wilson.
...
llvm-svn: 156959
2012-05-16 22:28:47 +00:00
Rafael Espindola
7f90b7d4c2
Fix our handling of visibility in explicit template instantiations.
...
* Don't copy the visibility attribute during instantiations. We have to be able
to distinguish
struct HIDDEN foo {};
template<class T>
DEFAULT void bar() {}
template DEFAULT void bar<foo>();
from
struct HIDDEN foo {};
template<class T>
DEFAULT void bar() {}
template void bar<foo>();
* If an instantiation has an attribute, it takes precedence over an attribute
in the template.
* With instantiation attributes handled with the above logic, we can now
select the minimum visibility when looking at template arguments.
llvm-svn: 156821
2012-05-15 14:09:55 +00:00
Douglas Gregor
87a170c1e6
Teach the parser to deal with multiple spellings for the same
...
attribute, rather than requiring multiple cases in consumers of this
information.
llvm-svn: 156666
2012-05-11 23:37:49 +00:00
Jim Grosbach
6f855e3024
ARM: Support marking intrinsic definitions as 'unavailable'
...
llvm-svn: 156490
2012-05-09 18:17:30 +00:00
Richard Smith
ce52ca178d
Remove DiagGroups from notes, and add a TableGen assertion to catch them.
...
llvm-svn: 156192
2012-05-04 19:05:50 +00:00
Douglas Gregor
377f99bc68
Replace the StringSwitch in AttributeList::getKind() with a
...
TableGen-generated StringMatcher, for a 1.2% speedup in -fparse-only
time in <rdar://problem/11004361>. Thanks to Benjamin for pointing me
at StringMatcher!
llvm-svn: 156003
2012-05-02 17:33:51 +00:00
Douglas Gregor
19fbb8fa81
Introduce the notion of 'ignored' attributes, so that all attributes
...
we accept are not modeled somehow via Attr.td.
llvm-svn: 155998
2012-05-02 16:18:45 +00:00
Douglas Gregor
b2daf8416e
Introduce the notion of an attribute that has no direct representation
...
as an AST node, and fold a number of such attributes into Attr.td.
llvm-svn: 155995
2012-05-02 15:56:52 +00:00
Douglas Gregor
0191bf8655
Revert my optimization to AttributeList::getKind() in r155987;
...
Benjamin has suggested a better approach.
llvm-svn: 155989
2012-05-02 14:50:50 +00:00
Douglas Gregor
adfe5afe38
Replace the StringSwitch in AttributeList::getKind(const
...
IdentifierInfo *) with a static StringMap, improving -fsyntax-only
performance by 1% for the example in <rdar://problem/11004361>.
llvm-svn: 155987
2012-05-02 14:24:30 +00:00
Gabor Greif
ec1f7e872c
Add a FIXME for uncomplete comment
...
fix a typo
add punctuation
llvm-svn: 155443
2012-04-24 15:42:03 +00:00
David Blaikie
2e3380308e
Add SmallVectorImpl Visual Studio visualizer. Patch by Nikola Smiljanic.
...
llvm-svn: 155140
2012-04-19 17:26:49 +00:00
Eric Christopher
aefeaa9873
Remove the vestiges of the C backend.
...
llvm-svn: 153308
2012-03-23 05:51:52 +00:00
Aaron Ballman
fa432f30d4
Adding namespace qualifiers to the visualizers and improving their behavior.
...
Patch thanks to Nikola Smiljanic
llvm-svn: 152514
2012-03-10 22:28:45 +00:00
Argyrios Kyrtzidis
8b0f3e0525
[utils/FuzzTest] Add '--stop-on-fail' to stop the script on the first failure
...
without reverting the changes.
llvm-svn: 152333
2012-03-08 20:29:39 +00:00
Argyrios Kyrtzidis
941d092933
[utils/FuzzTest] The help message says that if you don't specify --max-tests
...
"the script will run forever continually picking new tests to run", make it so.
llvm-svn: 152327
2012-03-08 20:11:06 +00:00
Argyrios Kyrtzidis
05d2212db3
[utils/FuzzTest] For --filelist the option type is string, not integer.
...
llvm-svn: 152324
2012-03-08 18:56:59 +00:00
Daniel Dunbar
1c66a0e1c0
Spelling.
...
llvm-svn: 152281
2012-03-08 01:54:33 +00:00
Michael Han
4a04517329
Refactor Clang sema attribute handling.
...
This submission improves Clang sema handling by using Clang tablegen
to generate common boilerplate code. As a start, it implements AttributeList
enumerator generation and case statements for AttributeList::getKind.
A new field "SemaHandler" is introduced in Attr.td and by default set to 1
as most of attributes in Attr.td have semantic checking in Sema. For a small
number of attributes that don't appear in Sema, the value is set to 0.
Also there are a small number of attributes that only appear in Sema but not
in Attr.td. Currently these attributes are still hardcoded in Sema AttributeList.
Reviewed by Delesley Hutchins.
llvm-svn: 152169
2012-03-07 00:12:16 +00:00
Argyrios Kyrtzidis
87acf19a5c
[tablegen] Make sure that the code that is determining the order of warning groups
...
is shared to avoid any "misalignment" if indices.
llvm-svn: 152074
2012-03-06 00:00:38 +00:00
Anna Zaks
6ecb6a6b7f
[analyzer] Testing: These checkers are not experimental anymore.
...
llvm-svn: 150989
2012-02-20 21:10:40 +00:00
Benjamin Kramer
a8cafe23e3
Store the warning option corresponding to a diagnostics as an index into the option table instead of storing the name.
...
Another 8 bytes + relocation removed from every diagnostic on x86_64.
llvm-svn: 150615
2012-02-15 20:57:03 +00:00
Anna Zaks
a432feaf26
[analyzer] Add the Malloc checker to the list of tested checkers.
...
llvm-svn: 150535
2012-02-15 00:19:07 +00:00
Dmitri Gribenko
5dc3a6936d
Add a script that produces a list of all diagnostics that are defined in
...
Diagnostic*.td files but not used in sources.
llvm-svn: 150410
2012-02-13 20:21:52 +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
Daniel Dunbar
dc51baade4
Remove stray semi-colon.
...
llvm-svn: 150231
2012-02-10 06:00:29 +00:00
Benjamin Kramer
3edb3b4ac5
Kill the brief and full explanation fields from StaticDiagInfoRec. They were unused and wasted space for nothing.
...
- per PR11952.
llvm-svn: 150199
2012-02-09 19:38:26 +00:00
Aaron Ballman
abc7c5c5b6
Added MSVC visualizers for PointerIntPair and PointerUnions.
...
Patch by Nikola Smiljanic
llvm-svn: 149896
2012-02-06 20:47:31 +00:00
Benjamin Kramer
bf8da9d706
Move instantiateTemplateAttribute into the sema namespace, make helpers static.
...
llvm-svn: 149864
2012-02-06 11:13:08 +00:00
Anna Zaks
4c1ef976a8
[analyzer] Testing: add automated reference results reset.
...
llvm-svn: 149682
2012-02-03 06:35:23 +00:00
Anna Zaks
97981bdeb0
[analyzer] Testing: add 2 new checkers to the buildbot script.
...
llvm-svn: 149514
2012-02-01 16:46:57 +00:00
Anna Zaks
b3d896d333
[analyzer] Add the HTML file to the SATest diagnostic diff.
...
(Uses the functionality which has been in CmpRuns long before.)
llvm-svn: 148868
2012-01-24 21:57:35 +00:00
Anna Zaks
895c312404
[analyzer] Testing: make diagnostic diffs more informative (add
...
diagnostic message).
llvm-svn: 148867
2012-01-24 21:57:32 +00:00
Anna Zaks
a08c6b7efc
[analyzer] Unbreak the static analyzer bot. Regression from r148558.
...
When we build a single source file, we call clang directly (not though scan-build).
llvm-svn: 148612
2012-01-21 01:11:35 +00:00
DeLesley Hutchins
30398dd410
Delayed template instantiation of late-parsed attributes.
...
llvm-svn: 148595
2012-01-20 22:50:54 +00:00
DeLesley Hutchins
ceec3063e2
Instantiate dependent attributes when instantiating templates.
...
llvm-svn: 148592
2012-01-20 22:37:06 +00:00
Anna Zaks
7a75cf32a2
[analyzer] Tweak the buildbot script to include the experimental taint checker and correct the checker enabling setting.
...
llvm-svn: 148558
2012-01-20 19:10:59 +00:00
David Blaikie
8a40f700e6
Remove unreachable code in Clang. (replace with llvm_unreachable where appropriate or when GCC requires it)
...
llvm-svn: 148292
2012-01-17 06:56:22 +00:00
David Blaikie
f47fa304a4
Remove unnecessary default cases in switches over enums.
...
This allows -Wswitch-enum to find switches that need updating when these enums are modified.
llvm-svn: 148281
2012-01-17 02:30:50 +00:00
Jakob Stoklund Olesen
6f2288b67c
CodeInit was replaced by StringInit.
...
llvm-svn: 148095
2012-01-13 04:57:47 +00:00
Anna Zaks
de1f7f8bfb
[analyzer] Testing infrastructure: Flush output after every print
...
statement.
llvm-svn: 147862
2012-01-10 18:10:25 +00:00
Benjamin Kramer
4fde7a8007
Remove unused include of VectorExtras.h.
...
llvm-svn: 147737
2012-01-07 19:41:22 +00:00
Anna Zaks
5acd9603da
[analyzer] Correct the error message in the testing infrastructure.
...
llvm-svn: 147568
2012-01-04 23:53:50 +00:00
Bob Wilson
bd646de67f
Relax type checking for a few Neon intrinsics. <rdar://problem/10538555>
...
Not long ago, I tightened up the type checking for pointer arguments of
Neon intrinsics to match the specifications provided by ARM. One consequence
was that it became impossible to access the unaligned versions of a few
Neon load/store operations. Since there are just a few of these intrinsics
where it makes a difference, I think it's better to relax the type checking
than to either introduce new non-standard unaligned intrinsics or to disallow
intrinsics for the unaligned operations.
llvm-svn: 146963
2011-12-20 06:16:48 +00:00
David Blaikie
68e081d606
Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
...
llvm-svn: 146959
2011-12-20 02:48:34 +00:00
Douglas Gregor
49ccfaa938
Add support for pretty-printing attributes, from Richard Membarth!
...
llvm-svn: 145002
2011-11-19 19:22:57 +00:00
Bob Wilson
89d14247ff
Fix Neon builtin pointer argument checking for "sret" builtins.
...
The code for checking Neon builtin pointer argument types was assuming that
there would only be one pointer argument. But, for vld2-4 builtins, the first
argument is a special sret pointer where the result will be stored. So,
instead of scanning all the arguments to find a pointer, have TableGen figure
out the index of the pointer argument that needs checking. That's better than
scanning all the arguments regardless. <rdar://problem/10448804>
llvm-svn: 144834
2011-11-16 21:32:23 +00:00
Benjamin Kramer
fee467a0d0
Validate DiagGroup names in TableGen, they're used as command line arguments so we don't want shell meta chars in there.
...
llvm-svn: 144645
2011-11-15 12:54:53 +00:00
Anna Zaks
26573c5585
[analyzer] Testing: test with all the non-experimental checker packages.
...
llvm-svn: 144142
2011-11-08 22:41:25 +00:00
Anna Zaks
a1b56e2aa3
[analyzer] Testing: support for regenerate reference output
...
Change the flow of the SATestAdd so that it could be used for regenerating
the reference output without exiting with an error.
llvm-svn: 144141
2011-11-08 22:41:22 +00:00
Anna Zaks
767d356f87
[analyzer] Testing: Display the number of reported differences in the main log.
...
llvm-svn: 144113
2011-11-08 19:56:31 +00:00
Bob Wilson
e4d7723b87
Check pointer types for arguments of Neon load/store macros. rdar://9958031
...
The Neon load/store intrinsics need to be implemented as macros to avoid
hiding alignment attributes on the pointer arguments, and the macros can
only evaluate those pointer arguments once (in case they have side effects),
so it has been hard to get the right type checking for those pointers.
I tried various alternatives in the arm_neon.h header, but it's much more
straightforward to just check directly in Sema.
llvm-svn: 144075
2011-11-08 05:04:11 +00:00
Bob Wilson
98bc98caa8
Clean up type flags for overloaded Neon builtins. No functional change.
...
This patch just adds a simple NeonTypeFlags class to replace the various
hardcoded constants that had been used until now. Unfortunately I couldn't
figure out a good way to avoid duplicating that class between clang and
TableGen, but since it's small and rarely changes, that's not so bad.
llvm-svn: 144054
2011-11-08 01:16:11 +00:00
Anna Zaks
ae9d54bcf3
[analyzer] Testing infrastructure: flush the output between projects.
...
llvm-svn: 144051
2011-11-08 00:27:56 +00:00
Benjamin Kramer
44f91da8cc
Use StringRef's case transformation methods.
...
llvm-svn: 143889
2011-11-06 20:36:48 +00:00
Anna Zaks
84726dd72c
[analyzer] Relax the cmp criteria for analyzer reports.
...
Until we find out a way to easily find out what changed by looking at the logs.
llvm-svn: 143789
2011-11-05 05:20:56 +00:00
Anna Zaks
4720a730f6
[analyzer] Add support for testing with individual preprocessed files.
...
llvm-svn: 143786
2011-11-05 05:20:48 +00:00
Anna Zaks
42a4463091
[analyzer] Tweak the test script
...
Rename the pre_run_static_analyzer script into cleanup_run_static_analyzer
and use it to clean up after the reference build - which is done as part of
adding a new project to the system.
llvm-svn: 143568
2011-11-02 20:46:50 +00:00
Chandler Carruth
c5d72c103b
Update the CMake build for clang-tblgen to reflect that it directly
...
depends on the Support library rather than relying on TableGen's
transitive dependency.
llvm-svn: 143532
2011-11-02 05:04:43 +00:00
Dan Gohman
c8338b1b14
Remove the Alpha backend.
...
llvm-svn: 143165
2011-10-27 22:56:49 +00:00
Dan Gohman
93127aecb9
Remove the Blackfin backend.
...
llvm-svn: 142881
2011-10-25 00:06:12 +00:00
Dan Gohman
53bb0ff685
Remove the SystemZ backend.
...
llvm-svn: 142879
2011-10-24 23:48:52 +00:00
Bob Wilson
3b476aec6d
Add __nodebug__ attribute to functions in arm_neon.h
...
This matches what we do for Intel vector intrinsics. <rdar://problem/10280207>
llvm-svn: 141958
2011-10-14 16:55:33 +00:00
Richard Smith
caf3390d44
Constant expression evaluation refactoring:
...
- Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
behaviour.
- Factor out evaluation of bitfield bit widths.
- Fix a few places which would evaluate an expression twice: once to determine
whether it is a constant expression, then again to get the value.
llvm-svn: 141561
2011-10-10 18:28:20 +00:00
Peter Collingbourne
bf8989fd19
Make clang-tblgen's Makefile independent of Clang's top-level Makefile,
...
to avoid having to make it available for the cross build when it
builds only clang-tblgen.
llvm-svn: 141453
2011-10-08 00:26:35 +00:00
Anna Zaks
f0c4116202
[analyzer] Static Analyzer Qualification Infrastructure: Scripts to support basic testing of the analyzer on external projects. This can be used as a basis for setting up a buildbot.
...
llvm-svn: 141337
2011-10-06 23:26:27 +00:00
Peter Collingbourne
bee583fd6e
Add the Clang tblgen backends to Clang, and flip the switch to cause
...
the build systems to use clang-tblgen.
llvm-svn: 141291
2011-10-06 13:03:08 +00:00
Anna Zaks
ea8f5725c5
[analyzer] CmpRuns can now optionally delete empty reports.
...
llvm-svn: 139550
2011-09-12 22:40:36 +00:00
Anna Zaks
b80d836137
[analyzer] CmpRuns.cmpScanBuildResults() should be easy to call from other modules.
...
llvm-svn: 139543
2011-09-12 21:32:41 +00:00
Anna Zaks
03f3598ff1
Rename CmpRuns into CmpRuns.py so that it could be used as a module.
...
llvm-svn: 139540
2011-09-12 21:07:18 +00:00
Douglas Gregor
d99d49c6cb
Easier debugging with Visual Studio Visualizers, from Nikola Smiljanic!
...
llvm-svn: 136207
2011-07-27 05:22:46 +00:00
Chris Lattner
57540c5be0
fix a bunch of comment typos found by codespell. Patch by
...
Luis Felipe Strano Moraes!
llvm-svn: 129559
2011-04-15 05:22:18 +00:00
Douglas Gregor
16ac0ad8b4
Minor fix for clang-completion-mode, from Dve Abrahams
...
llvm-svn: 121771
2010-12-14 16:52:29 +00:00
Daniel Dunbar
32f1b54b69
utils/ABITest: Factor out type naming code slightly.
...
llvm-svn: 114867
2010-09-27 20:13:24 +00:00
Daniel Dunbar
1998651529
utils/ABITest: Tweak default bit-field types to cover some more interesting cases.
...
llvm-svn: 114866
2010-09-27 20:13:22 +00:00
Daniel Dunbar
47dd9c2fc5
utils/ABITest: Add a workaround for mismatches due to PR5579.
...
llvm-svn: 114865
2010-09-27 20:13:19 +00:00
Daniel Dunbar
22ec2c218c
utils/ABITest: Add option to skip individual tests by index.
...
llvm-svn: 114864
2010-09-27 20:13:17 +00:00
Douglas Gregor
c3d6cb6543
Fix typo in test program
...
llvm-svn: 108298
2010-07-14 00:09:17 +00:00
Daniel Dunbar
3dbd7b51ca
FuzzTest: Add support for reading list of replacements from a file.
...
llvm-svn: 105177
2010-05-30 22:27:55 +00:00
Daniel Dunbar
ef261ba507
utils: Add a generic fuzz testing tool.
...
llvm-svn: 105176
2010-05-30 22:27:52 +00:00
Ted Kremenek
6542feb92c
Wrap 'data' key in quotes.
...
llvm-svn: 101594
2010-04-17 00:37:35 +00:00
Ted Kremenek
9e9dd5c535
Make script actually work.
...
llvm-svn: 101591
2010-04-17 00:33:24 +00:00
Ted Kremenek
bfd5a75b1c
Log code completion data in json format.
...
llvm-svn: 101587
2010-04-17 00:21:44 +00:00
Ted Kremenek
72ac9505f0
Include sender address in completion log.
...
llvm-svn: 101358
2010-04-15 06:32:15 +00:00
Ted Kremenek
ef0ada67f5
Add simple python server for recording code completion timings.
...
llvm-svn: 101327
2010-04-15 01:02:31 +00:00
Anders Carlsson
5a9754187d
More magic.
...
llvm-svn: 99803
2010-03-29 03:26:49 +00:00
Anders Carlsson
473444e05c
Sprinkle some sed dust over check-ztt to make it work with newer clang asm output. (I am not a sed expert so this might be terribly inefficient :)
...
llvm-svn: 99802
2010-03-29 03:21:40 +00:00
Anders Carlsson
e5d78c03c3
Didn't mean to commit this.
...
llvm-svn: 99607
2010-03-26 04:14:45 +00:00
Anders Carlsson
92d95f2f7b
Use the new vtable layout code for construction vtables.
...
llvm-svn: 99606
2010-03-26 04:13:46 +00:00
Douglas Gregor
e50c05244f
make the vtable tester a little friendlier, with a clean target and without requiring . to be in your path
...
llvm-svn: 99433
2010-03-24 21:52:55 +00:00
Douglas Gregor
a71cc15361
Implement promotion for enumeration types.
...
WHAT!?!
It turns out that Type::isPromotableIntegerType() was not considering
enumeration types to be promotable, so we would never do the
promotion despite having properly computed the promotion type when the
enum was defined. Various operations on values of enum type just
"worked" because we could still compute the integer rank of an enum
type; the oddity, however, is that operations such as "add an enum and
an unsigned" would often have an enum result type (!). The bug
actually showed up as a spurious -Wformat diagnostic
(<rdar://problem/7595366>), but in theory it could cause miscompiles.
In this commit:
- Enum types with a promotion type of "int" or "unsigned int" are
promotable.
- Tweaked the computation of promotable types for enums
- For all of the ABIs, treat enum types the same way as their
underlying types (*not* their promotion types) for argument passing
and return values
- Extend the ABI tester with support for enumeration types
llvm-svn: 95117
2010-02-02 20:10:50 +00:00
Douglas Gregor
efbaf99dca
Include <stdlib.h>, so that we're sure to get atoi.
...
llvm-svn: 95095
2010-02-02 17:49:52 +00:00
Daniel Dunbar
4c823ba358
Extern darwin-clang_rt.c test to also test targetting ARM ({armv6, armv7} x
...
{thumb,no-thumb}).
llvm-svn: 94264
2010-01-23 00:26:38 +00:00
Daniel Dunbar
9e406b4b60
Add a test for clang_rt support on Darwin. With appropriate massaging, this
...
checks that the runtime library can be linked and works for compiling on 10.6
for 10.{4,5,6} targets. Currently test is only for x86, and misses some
compiler-rt functions.
llvm-svn: 94083
2010-01-21 17:10:39 +00:00
Daniel Dunbar
0b9c603ee2
Tweak OptionalTests paths.
...
llvm-svn: 94082
2010-01-21 17:09:39 +00:00
Daniel Dunbar
d723b01311
Add utils/OptionalTests, a dumping ground for additional (lit) tests which for
...
one reason or another don't belong in the regular test suite.
Inside is utils/OptionalTests/Extra which is specifically for tests that match
the layout of the regular tests.
llvm-svn: 94080
2010-01-21 16:55:39 +00:00
John McCall
6d11e07b16
Insert clang-flags into the clang command. Currently it needs to be a list;
...
future work should permit strings (by splitting them into a list o' strings).
llvm-svn: 93299
2010-01-13 06:44:51 +00:00
Mike Stump
4b0e352061
Remove unused code.
...
llvm-svn: 93262
2010-01-12 22:20:00 +00:00
Mike Stump
a77e48c322
Improve covariance tester to randomize the return value more.
...
llvm-svn: 93254
2010-01-12 20:55:39 +00:00
Mike Stump
edd224743c
Add covariance tester.
...
llvm-svn: 93226
2010-01-12 03:01:18 +00:00
Mike Stump
ee6dfe55a5
Allow N_FIELDS to be 0.
...
llvm-svn: 93211
2010-01-12 00:28:59 +00:00
Mike Stump
b3ed45b67c
Fix indentation.
...
llvm-svn: 93023
2010-01-08 19:28:41 +00:00
Mike Stump
9620622431
Add in final overrider logic.
...
llvm-svn: 93022
2010-01-08 19:25:36 +00:00
Mike Stump
a52cf2ca3f
Add checker for type infos.
...
llvm-svn: 92956
2010-01-07 22:50:03 +00:00
Mike Stump
0015eb93c6
Add checked for VTTs.
...
llvm-svn: 92954
2010-01-07 22:28:10 +00:00
Mike Stump
24e9b0048c
Detailed vtable checker.
...
llvm-svn: 92953
2010-01-07 22:21:26 +00:00
Mike Stump
441793352d
1/2 off all structs should not have any virtual functions.
...
Replace magic numbers with uuids.
llvm-svn: 92941
2010-01-07 20:55:28 +00:00
Mike Stump
2a83635337
Add a descriptive tag to each line to make the exact differences
...
easier to understand.
llvm-svn: 92932
2010-01-07 19:39:43 +00:00
Mike Stump
bd0c5da5fc
Don't use two argument mixing function.
...
llvm-svn: 92929
2010-01-07 19:24:27 +00:00
Mike Stump
a771b0ad52
Also generate the .s files.
...
llvm-svn: 92928
2010-01-07 19:19:39 +00:00
Mike Stump
53b926c56f
Add a testcase generator for vtable/rtti testing. WIP.
...
llvm-svn: 92927
2010-01-07 18:58:28 +00:00
Daniel Dunbar
54f330f342
Tests: Tweak LLVM-Code-Symbols test to ignore common and undefined symbols for
...
now, let's start small.
llvm-svn: 92170
2009-12-26 22:58:48 +00:00
Daniel Dunbar
c19b219280
Sketch a simple new C++Tests suite for checking that llvm-gcc and clang generate
...
the same visible symbols, useful for finding ABI/Mangler/vtable/etc. issues.
llvm-svn: 92147
2009-12-24 21:27:38 +00:00
Douglas Gregor
53982d577d
Don't commit my silly little local changes
...
llvm-svn: 92010
2009-12-23 17:43:32 +00:00
Douglas Gregor
e6600379b1
Fix DISABLE_SMART_POINTERS build
...
llvm-svn: 92008
2009-12-23 17:40:29 +00:00
Douglas Gregor
39740dce30
Revert accidental commit
...
llvm-svn: 91930
2009-12-22 22:30:51 +00:00
Douglas Gregor
b6ea60872d
Switch Sema::AddCXXDirectInitializerToDecl over to InitializationSequence
...
llvm-svn: 91927
2009-12-22 22:17:25 +00:00
Daniel Dunbar
d2d3c7efe3
C++Tests: Add target paths for LLVM-Code-Compile checks as well.
...
llvm-svn: 91716
2009-12-18 21:27:23 +00:00
Douglas Gregor
95a438b291
Add a couple more paths to the LLVM-Code-Syntax test
...
llvm-svn: 91627
2009-12-17 21:51:02 +00:00
Douglas Gregor
4881735736
Remove accidental commit containing local paths for the LLVM-Code-Syntax test
...
llvm-svn: 91326
2009-12-14 20:58:24 +00:00
Douglas Gregor
4f84661c43
Minor cleanups for constructor initialization in InitializationSequence
...
llvm-svn: 91325
2009-12-14 20:57:13 +00:00
Douglas Gregor
9221e646f5
Switch the Emacs clang-completion-mode over to clang -cc1
...
llvm-svn: 91185
2009-12-11 23:47:56 +00:00
Daniel Dunbar
520d1e6c6b
Update docs/comments/utils/examples to refer to clang -cc1 instead of clang-cc.
...
llvm-svn: 91176
2009-12-11 23:04:35 +00:00
Douglas Gregor
96156a46e0
Beef up Clang-on-LLVM testing a bit, by making LLVM-Syntax recursive
...
(since we now parse all of the headers appropriately) and teaching
LLVM-Code-Syntax about the extra paths needed to parse the backends.
llvm-svn: 91068
2009-12-10 22:08:55 +00:00
Daniel Dunbar
bdd9669310
Add utils/TestUtils, and sink pch-test.pl there.
...
Also, add a test for generator a C file with a very deep call stack.
llvm-svn: 90468
2009-12-03 18:40:58 +00:00
Kovarththanan Rajaratnam
cb58439f34
Tuck away scan-build related files into tools/scan-build
...
llvm-svn: 90215
2009-12-01 06:52:01 +00:00
Kovarththanan Rajaratnam
63585ddf9d
Move ubiviz to analyzer directory
...
llvm-svn: 90213
2009-12-01 06:34:06 +00:00
Daniel Dunbar
0ec57ff203
Don't run the LLVM Code tests by default.
...
llvm-svn: 89937
2009-11-26 05:09:00 +00:00
Daniel Dunbar
9acb35a5e8
Add -Werror for Clang and LLVM on Clang (headers) syntax tests.
...
llvm-svn: 89936
2009-11-26 05:08:53 +00:00
Douglas Gregor
20d58fbd3a
Add C++ tests to try to parse and compile the LLVM libraries
...
llvm-svn: 89923
2009-11-26 02:28:53 +00:00
Douglas Gregor
4f5d0907b8
Don't try to parse LinkAllParses.h for now
...
llvm-svn: 89820
2009-11-25 00:31:20 +00:00
Ted Kremenek
4d1907c493
Remove '-checker-simple' reference from scan-build. Patch by Kovarththanan Rajaratnam!
...
llvm-svn: 89673
2009-11-23 17:37:58 +00:00
Daniel Dunbar
baa74770c9
Change Clang-Code-Compile tests to only -emit-llvm instead of running
...
codegen/as.
llvm-svn: 89634
2009-11-23 00:07:14 +00:00
Daniel Dunbar
5ad7e15698
Add two new C++ lit tests suites, for testing Clang .cpp files with
...
-fsyntax-only and with -c.
llvm-svn: 88845
2009-11-15 08:10:41 +00:00
Daniel Dunbar
4de54f823b
Add Clang-Syntax C++Tests; these don't run by default, use the lit arguments
...
'--param run_clang_syntax=1' to run them.
llvm-svn: 88839
2009-11-15 07:23:09 +00:00
Daniel Dunbar
1566a2257f
Use the other excludes syntax.
...
llvm-svn: 88836
2009-11-15 07:11:12 +00:00
Ted Kremenek
9f2ee2bb26
Use 'eq' operator, and enable regular experimental checks when --experimental-checks is passed to scan-build.
...
llvm-svn: 88673
2009-11-13 18:49:48 +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
Douglas Gregor
6af6c3ee56
Turn off -Wsign-compare warnings by default
...
llvm-svn: 86233
2009-11-06 05:24:12 +00:00
Douglas Gregor
02ba0ea461
When we encounter a derived-to-base conversion when performing an
...
implicit conversion sequence, check the validity of this conversion
and then perform it.
llvm-svn: 86210
2009-11-06 01:02:41 +00:00
Douglas Gregor
3ec1bf240d
Fixed two places where we needed to force completion of a type
...
(without complaining if it fails) to get proper semantics: reference
binding with a derived-to-base conversion and the enumeration of
constructors for user-defined conversions. There are probably more
cases to fix, but my prior attempt at statically ensuring that
complete-type checking always happens failed. Perhaps I'll try again.
With this change, Clang can parse include/llvm/*.h!
llvm-svn: 86129
2009-11-05 13:06:35 +00:00
Douglas Gregor
8413751fab
Experimental, ultra-hacking Emacs minor mode for Clang-based code completion.
...
llvm-svn: 83681
2009-10-09 22:17:40 +00:00
Ted Kremenek
05e6f5b6e9
Turn on 'RegionStore' as the default store manager both for 'clang --analyze' and 'scan-build'. Leave 'BasicStore' as the default store manager in 'clang-cc'. While there are still known warts with RegionStore, it's ready to be tested by general users.
...
llvm-svn: 82752
2009-09-25 05:55:59 +00:00
Daniel Dunbar
b5cbf77c2e
Remove old test runner, this has moved to LLVM/utils/lit and all known clients
...
have been updated.
- Please let me know of any problems.
llvm-svn: 82524
2009-09-22 05:16:02 +00:00
Daniel Dunbar
be657e5b28
A toy for Doug: Add some 'lit' tests which just run clang++ -fsyntax-only over all the files in a directory.
...
- 'lit utils/C++Tests' to run, you may need to fix the stdc++ include path, and your mileage may vary.
- A handful of the LLVM headers are XFAIL because they don't include the right headers.
llvm-svn: 81990
2009-09-16 01:40:13 +00:00
Daniel Dunbar
56b534d2d6
Also compare stdout and stderr lines.
...
llvm-svn: 81018
2009-09-04 18:35:09 +00:00
Daniel Dunbar
156fa7dde0
Make CmpDriver less stupid.
...
llvm-svn: 81012
2009-09-04 17:41:47 +00:00
Daniel Dunbar
79ee0fa59c
Add a valgrind suppressions file for x86_64-pc-linux-gnu and gcc-4.3.3 which
...
suppresses the overlapped memcpy in stable_sort that clang triggers.
llvm-svn: 80982
2009-09-04 02:53:57 +00:00
Daniel Dunbar
3009f81d1d
Add --vg-arg option to clang test runner.
...
- Passes additional argument through to valgrind.
Also, don't run valgrind with --leak-check=no by default.
llvm-svn: 80981
2009-09-04 02:53:50 +00:00
Anders Carlsson
115d6bfcac
Whoops, did not mean to commit this
...
llvm-svn: 79201
2009-08-16 20:29:59 +00:00
Anders Carlsson
a471db0dd4
Store the delete operator for delete expressions.
...
llvm-svn: 79200
2009-08-16 20:29:29 +00:00
Benjamin Kramer
312fde6420
lit: flush stdout in no-fancy-progress-bar mode as well.
...
llvm-svn: 79056
2009-08-14 23:34:45 +00:00
Ted Kremenek
d0d7256b8f
Pass '-Wno-' options to clang-cc. This fixes <rdar://problem/6943988>.
...
llvm-svn: 79011
2009-08-14 18:20:50 +00:00
Daniel Dunbar
1a9db99932
Add a simple tool for comparing two static analyzer runs, primarily for use from
...
buildbot.
llvm-svn: 78336
2009-08-06 21:15:33 +00:00
Daniel Dunbar
4728100e8d
Fix locating the 'lit.cfg' file when running on only a single file in the
...
current directory.
llvm-svn: 78271
2009-08-06 01:41:03 +00:00
Ted Kremenek
36c14a0f1a
Renable "html" indexing by default.
...
llvm-svn: 78077
2009-08-04 17:05:18 +00:00
Daniel Dunbar
83142021fb
lit: Some sample tests, for testing the tester
...
llvm-svn: 78050
2009-08-04 04:40:15 +00:00
Ted Kremenek
ba8d7fc6bf
Recognize '-M' and '-MM' options.
...
llvm-svn: 78027
2009-08-04 00:57:12 +00:00
Ted Kremenek
90fc8a492e
'unlink' file directly instead of invoking system shell.
...
llvm-svn: 78026
2009-08-04 00:55:59 +00:00
Ted Kremenek
90e2e07bd5
Have scan-build clue off of 'BUGMETAEND' to know when to stop processing an HTML file.
...
llvm-svn: 78022
2009-08-03 23:45:27 +00:00
Daniel Dunbar
f0e2ea2869
lit: Don't treat '\' as an escape in unquoted strings, on Win32. This turns out
...
to not be a very good idea.
llvm-svn: 77957
2009-08-03 05:29:22 +00:00
Ted Kremenek
7ac29bb2d8
Include '-o' arguments in verbose output.
...
llvm-svn: 77881
2009-08-02 05:42:46 +00:00
Daniel Dunbar
6cfaa47c85
lit: Catch (internal) exceptions when using --no-sh.
...
llvm-svn: 77830
2009-08-01 23:18:27 +00:00
Daniel Dunbar
5a283bf848
lit: Fix thinko in finding config file.
...
llvm-svn: 77828
2009-08-01 23:09:12 +00:00
Daniel Dunbar
590c358681
lit: Add internal script execution.
...
- Off by default, you can test it with the --no-sh argument.
- For me it works for all but 3 tests, but there a number of FIXMEs and QOI
issues:
o Redirection isn't completely accurate -- in practice it can't portably
be, but I would like to error out if someone writes something which isn't
going to work. This is the source of the 3 test failures.
o Some pipe configurations have the potential to deadlock.
o It is significantly slower when multithreaded. I believe this is due to
locking happening under the hood, there is probably some kind of solution
but I haven't investigated yet.
o Log output is ugly.
llvm-svn: 77784
2009-08-01 10:18:01 +00:00
Daniel Dunbar
82fa6f5e9d
lit: Two more sh lex/parse bugs (but its so simple!)
...
- Empty arguments weren't handled correctly.
- Escapes outside quoted strings weren't handled.
llvm-svn: 77783
2009-08-01 09:41:09 +00:00
Daniel Dunbar
1661066e58
lit: Fix two sh lexing bugs.
...
- '\\\\' inside a "..." string becomes '\\'.
- The '<' token wasn't being recognized.
llvm-svn: 77777
2009-08-01 05:52:04 +00:00
Daniel Dunbar
dc4a0f7427
lit: Fix a name lookup problem, which only occurred on a race condition. This is
...
why dynamic binding sucks.
llvm-svn: 77773
2009-08-01 04:11:36 +00:00
Daniel Dunbar
3ee0543e67
lit: Pull a few more variables into the TestingConfig object.
...
llvm-svn: 77772
2009-08-01 04:06:02 +00:00
Daniel Dunbar
5332311370
lit: Don't use threads when only running one test, or with -j 1.
...
llvm-svn: 77766
2009-08-01 03:35:40 +00:00
Daniel Dunbar
2653167290
MultiTestRunner: Add 'sh' parsing to ShUtil.
...
llvm-svn: 77765
2009-08-01 03:22:27 +00:00
Daniel Dunbar
cd4c338437
MultiTestRunner: Fix invalid warning when pointing 'lit' directly at a test.
...
llvm-svn: 77690
2009-07-31 18:12:18 +00:00
Daniel Dunbar
1087599185
MultiTestRunner: Add module for lexing 'sh' commands.
...
llvm-svn: 77668
2009-07-31 07:59:05 +00:00
Daniel Dunbar
3667b99af3
MultiTestRunner: Simplify, cleanup, and rename!
...
- MultiTestRunner will eventually be renamed to 'lit', for LLVM integrated
tester/testing. This has the pros of being pronouncable and short.
- "Project" level configuration lives in 'lit.cfg', which is also what lit uses
to find the root testing directory in some cases. This can be overridden for
use in project files which want to precisely specify where things are.
- TestRunner.py is not longer able to be invoked directly.
- Moved some code to Util.py.
- Introduced a configuration object.
- Cleaned up --help, removed a few not-very-useful options.
- Tried not to break anything that works. :)
llvm-svn: 77665
2009-07-31 05:54:17 +00:00
Ted Kremenek
bfe393fa0a
Add scan-build option '-no-failure-reports' to supress the creation of a 'failures' subdirectory that includes crash reports, preprocessed files, etc.
...
llvm-svn: 77644
2009-07-30 23:55:19 +00:00
Daniel Dunbar
ba848438e3
MultiTestRunner: Stop printing XFAILs on every run, this doesn't really have any
...
value.
llvm-svn: 77566
2009-07-30 01:57:45 +00:00
Daniel Dunbar
0a1fa85894
scan-build: Don't try to index plist-html output directories
...
llvm-svn: 77465
2009-07-29 16:21:23 +00:00
Douglas Gregor
436081940c
Make the Python TestRunner work for individual tests
...
llvm-svn: 77456
2009-07-29 15:32:08 +00:00
Daniel Dunbar
1cb8d81b41
MultiTestRunner: Reenable --vg option.
...
- Simplified from before and using --error-exitcode so failures show up as
failures.
llvm-svn: 77424
2009-07-29 02:57:25 +00:00
Ted Kremenek
0799d4f0bb
Only generate preprocessed files during crashes using Clang, not GCC.
...
llvm-svn: 77281
2009-07-28 00:14:21 +00:00
Ted Kremenek
5cc54863ce
Add scan-build support for 'plist-html', a hybrid mode that supports the
...
creation of both HTML and plist files. Plist files are currently not generated
using the same layout algorithm as just specifying '-plist', so this is mainly
intended to help support automated runs of the analyzer.
llvm-svn: 77263
2009-07-27 22:10:34 +00:00
Daniel Dunbar
b8aa9589bb
Tweak MultiTestRunner --path argument.
...
- Accept multiple values instead of embedding separator.
- Make sure this gets used when searching for 'clang' binary.
- Switch makefiles to using --path to stay in sync with cmake.
llvm-svn: 77234
2009-07-27 19:01:13 +00:00
Daniel Dunbar
605bd11311
MultiTestRunner: Make sure to point at src dir, for out of tree builds.
...
Factor out routine for executing the script commands.
llvm-svn: 77075
2009-07-25 15:26:08 +00:00
Daniel Dunbar
4edf8a17d5
MultiTestRunner: Cleanup test execution & output.
...
- Stop writing everything to files.
- Make test output more standard.
llvm-svn: 77074
2009-07-25 14:46:05 +00:00
Daniel Dunbar
f7e06f946c
MultiTestRunner: Drop external script and DejaGNU compatibility options for now.
...
- We don't use the former, and the latter doesn't actually work.
llvm-svn: 77073
2009-07-25 13:19:40 +00:00
Daniel Dunbar
6db90064f8
MultiTestRunner: Disable valgrind support for now, I don't feel like maintaining
...
it currently.
llvm-svn: 77072
2009-07-25 13:13:06 +00:00
Daniel Dunbar
a2f6b0dde0
MultiTestRunner/Win32: Add SYSTEMROOT to environment, replace '&&' in .bat
...
files.
llvm-svn: 77071
2009-07-25 12:57:15 +00:00
Daniel Dunbar
595c98729b
Make having no RUN line a failure.
...
Doug, please look at decltype-crash and instantiate-function-1.mm, I'm not sure
if they are actually testing the right thing / anything.
llvm-svn: 77070
2009-07-25 12:47:38 +00:00
Daniel Dunbar
011e3c9905
Remove this Makefile, it is unused.
...
llvm-svn: 77067
2009-07-25 12:37:21 +00:00
Daniel Dunbar
6c6c0e1769
MultiTestRunner: Oops, clang wasn't being substituted properly. This is why the
...
cxx-using-declaration test case started exhibiting different behavior. It still
needs to be fixed, however...
llvm-svn: 77066
2009-07-25 12:23:35 +00:00
Daniel Dunbar
e87599356f
MultiTestRunner: Always use absolute path names for tests.
...
Also, fix a function name I forgot to update.
llvm-svn: 77064
2009-07-25 12:05:55 +00:00
Daniel Dunbar
97ea867690
MultiTestRunner: Validate '&&' at the end of RUN lines.
...
- This is just to normalize, these will go away soon hopefully.
Added all the missing '&&'s that have crept in. :)
llvm-svn: 77062
2009-07-25 11:27:37 +00:00
Daniel Dunbar
3ab3b5e17a
MultiTestRunner: Explicitly define child environment, the only variable we need
...
to import is the PATH.
llvm-svn: 77061
2009-07-25 10:14:19 +00:00
Daniel Dunbar
3c2da2bb7e
MultiTestRunner.py improvements.
...
- Tweak output directories for temp files, derive the temporary base from the
test's parent directory name, and the test name (instead of the whole path).
llvm-svn: 77059
2009-07-25 09:53:43 +00:00
Daniel Dunbar
e6475f1192
MultiTestRunner.py improvements.
...
- Not improved: the horribly lousy name. :)
- Suppress stderr when capturing output.
- Rewrite which() to do the right PATH search instead of being lazy and
shelling out to 'which'.
- On Windows, run scripts as batch files (via 'cmd /c ...').
llvm-svn: 77058
2009-07-25 09:42:24 +00:00
Anders Carlsson
e9e9abb2fb
Whoops, did not mean to check this in.
...
llvm-svn: 77022
2009-07-25 00:26:00 +00:00
Anders Carlsson
87a9a34e5b
More work on the constant struct builder. We now try to layout all constant structs but throw away the result.
...
llvm-svn: 77021
2009-07-25 00:24:56 +00:00
Ted Kremenek
cd31df0f3f
Enable the '-warn-security-syntactic' checker option by default.
...
llvm-svn: 76933
2009-07-24 02:52:07 +00:00
Ted Kremenek
c3fd33014c
Remove bogus check.
...
llvm-svn: 76259
2009-07-17 22:45:54 +00:00
Ted Kremenek
1d67c22949
Add error message when clang-cc cannot be found.
...
llvm-svn: 76256
2009-07-17 22:38:26 +00:00
Daniel Dunbar
dde5c8d522
Add extra print for --time-tests output.
...
llvm-svn: 76104
2009-07-16 21:18:21 +00:00
Daniel Dunbar
047f00ca4a
Make stdin for test scripts empty, so that tests don't accidentally hang waiting
...
for stdin.
llvm-svn: 75506
2009-07-13 21:24:28 +00:00
Daniel Dunbar
5ae1e029f4
Add --time-tests option to test runner, for profiling 'make test'.
...
llvm-svn: 75396
2009-07-11 22:46:27 +00:00
Nuno Lopes
14ea24e422
restore proper valgrind support.
...
disclaim: I know nothing about Python, so apologies in advance if I break something
llvm-svn: 75368
2009-07-11 18:34:43 +00:00
Eli Friedman
837f574ee9
Use /usr/bin/env trick to find python. Patch by Krister Walfridsson.
...
llvm-svn: 75271
2009-07-10 20:15:12 +00:00
Argyrios Kyrtzidis
1561c6cf54
Having tests that depend on previously created files is bad idea. Fix them to be self-sufficient.
...
llvm-svn: 74810
2009-07-06 00:03:47 +00:00
Argyrios Kyrtzidis
5641111e3f
Make use of the Index library through the index-test tool.
...
'index-test' is now able to provide additional info for a Decl, through multiple AST files:
-Find declarations
-Find definitions
-Find references
llvm-svn: 74803
2009-07-05 22:22:35 +00:00
Daniel Dunbar
43d74cd948
Revert prev commit, we have much bigger problems because 2.3 is missing
...
the subprocess module.
llvm-svn: 74738
2009-07-02 23:58:07 +00:00
Daniel Dunbar
22da185ed8
Avoid @staticmethod to allow use with Python 2.3.
...
llvm-svn: 74737
2009-07-02 23:56:37 +00:00
Daniel Dunbar
3f460e84d0
Testing improvements:
...
- Make python test runner force COLUMNS=0 to increase determinism.
- Substitute clang-cc as we do for clang.
- Improved detection of Ctrl-C.
- Honor CLANG and CLANGCC environment variables.
- Add proper command line arguments to TestRunner.py (see --help)
llvm-svn: 73640
2009-06-17 21:33:37 +00:00
Douglas Gregor
dca24385f3
If any tests fail, the test runner returns a status code of 1
...
llvm-svn: 73584
2009-06-16 23:40:23 +00:00
Douglas Gregor
274a6b4f2d
Update Clang to include the InitializeAllTargets and
...
InitializeAllAsmPrinters LLVM headers. Also includes some minor fixes
for the CMake-based build with Xcode.
llvm-svn: 73544
2009-06-16 20:13:51 +00:00
Douglas Gregor
30018a6860
Switch CMake testing over to use Daniels new(er) Python-based infrastructure.
...
llvm-svn: 72977
2009-06-05 23:57:17 +00:00
Douglas Gregor
278f52ec29
Refactor and clean up the AST printer, so that it uses a DeclVisitor,
...
walks through DeclContexts properly, and prints more of the
information available in the AST. The functionality is still available
via -ast-print, -ast-dump, etc., and also via the new member functions
Decl::dump() and Decl::print().
llvm-svn: 72597
2009-05-30 00:08:05 +00:00
Eli Friedman
1fd785f564
Minor build system changes to make ABITest work correctly on Linux.
...
llvm-svn: 72405
2009-05-25 22:07:09 +00:00
Eli Friedman
1cae3df3cf
Some minor corrections: don't use offsetof on a bitfield, and cast
...
printf operands to long to suppress warnings.
llvm-svn: 72404
2009-05-25 21:38:01 +00:00
Ted Kremenek
eef7a21507
Add hack to scan-build to fix PR 4215
...
(http://llvm.org/bugs/show_bug.cgi?id=4215 ): When xcodebuild is invoked with
-sdk iphonesimulator3.0, use gcc-4.2 instead of the system default gcc.
llvm-svn: 71891
2009-05-15 21:14:16 +00:00
Ted Kremenek
46727df06a
Re-enable passing analyzer options from scan-build to ccc-analyzer.
...
llvm-svn: 71836
2009-05-15 04:20:31 +00:00
Ted Kremenek
f9903da7fa
Don't strip quotes in compiler line for -D arguments.
...
Fixes PR 4205.
llvm-svn: 71835
2009-05-15 04:07:18 +00:00
Ted Kremenek
3c2775f0b0
Make scan-build process of --use-cc and --html-title more robust.
...
llvm-svn: 71567
2009-05-12 18:04:43 +00:00
Ted Kremenek
25421bb8f6
Use Text::ParseWords to make 'clang -###' parsing more robust.
...
llvm-svn: 71504
2009-05-11 23:29:51 +00:00
Daniel Dunbar
a3bb6f2e5b
Tweak this non-default test so it still works w/ x86 feature support.
...
llvm-svn: 71494
2009-05-11 23:11:21 +00:00
Ted Kremenek
dc99ec4ebd
ccc-analyzer should only analyze C and Objective-C files.
...
llvm-svn: 71474
2009-05-11 21:08:34 +00:00
Ted Kremenek
1f991f09df
Add total hack to get scan-build working again. ccc-analyzer calls
...
'clang -###' to get the appropriate arguments to pass to clang-cc.
This isn't a permanent solution.
llvm-svn: 71364
2009-05-09 19:19:28 +00:00
Daniel Dunbar
793cc3e0c3
ABITest: Improve test driver marginally, to allow running a specific
...
test index.
llvm-svn: 71295
2009-05-08 23:40:45 +00:00
Daniel Dunbar
3a53b857d0
ABITest: Move more of the common Makefile bits into the common
...
Makefile.
llvm-svn: 71274
2009-05-08 22:49:52 +00:00
Daniel Dunbar
811e62c8c1
ABITest: Fix a bug in generating test values for structures w/ no
...
non-padding fields.
llvm-svn: 71273
2009-05-08 22:48:39 +00:00
Daniel Dunbar
51c4bc320e
ABITest: Move default set of test args into common makefile.
...
Also, tweak default list of bit-fields to try.
llvm-svn: 71246
2009-05-08 20:10:52 +00:00
Daniel Dunbar
766004f179
Add various other bits I use to run ABITest.
...
llvm-svn: 71201
2009-05-08 00:49:21 +00:00
Daniel Dunbar
5bcbf1ccbd
Add to the house of cards that is ABITestGen.
...
- Support generating structures with bit-fields.
llvm-svn: 71192
2009-05-07 23:19:55 +00:00
Ted Kremenek
ce6b865c21
ccc-analyzer: Don't automatically generate 'Parser Rejects' files anymore. The
...
frontend is far enough along that most discrepancies between Clang and GCC are
(at least for C and Objective-C) are intentional. We also now have codegen to
test the frontend.
llvm-svn: 70303
2009-04-28 17:37:44 +00:00
Douglas Gregor
70091b8f43
Some fixes for PCH (de-)serialization of Objective-C AST nodes:
...
- Deal with the Receiver/ClassInfo shared storage in ObjCMessageExpr
- Implement PCH support for ImplicitParamDecl
- Fix the handling of the body of an ObjCMethodDecl
- Several cast -> cast_or_null fixes
- Make Selector::getIdentifierInfoForSlot work for 1-argument, NULL
selectors.
- Make Selector::getAsString() work with NULL selectors.
- Fix the names of VisitObjCAtCatchStmt and VisitObjCAtFinallyStmt
in the PCH reader and writer; these were never getting called.
At this point, all of the pch-test tests pass for C and Objective-C.
llvm-svn: 70163
2009-04-26 22:20:50 +00:00
Douglas Gregor
1d46a1f8a5
Simple little smoke-test script that tries to build PCH files and then
...
dump their contents for all of the compilable tests in Clang's
testsuite. All of the tests pass for C, but there are still many
failures for Objective-C.
llvm-svn: 70110
2009-04-26 03:52:11 +00:00
Daniel Dunbar
885db54671
Make this code a little more generic.
...
llvm-svn: 70103
2009-04-26 01:28:51 +00:00
Daniel Dunbar
dec9e1ec5e
Don't build error/warning/assertion detection in the testing script.
...
- This wasn't actually all that useful and isn't worth the extra
(hard)code.
llvm-svn: 69869
2009-04-23 05:03:44 +00:00
Ted Kremenek
9ebfe91dea
ccc-analyzer: Don't create preprocessed files about the ignored 'cdecl' attribute. We know Clang doesn't support it yet.
...
llvm-svn: 69802
2009-04-22 13:42:27 +00:00
Daniel Dunbar
44ea0b2e0e
Update this (non-default) test case.
...
llvm-svn: 69636
2009-04-20 23:53:56 +00:00
Daniel Dunbar
c0a4ea0c02
Remove CheckBuiltinMacros script, obsoleted since we support -dM now.
...
llvm-svn: 68990
2009-04-13 21:26:41 +00:00
Daniel Dunbar
497ff13243
Support -miphoneos-version-min in clang-cc.
...
- Patch by Shantonu Sen (with a minor tweak to split out
getDarwin{OSX,IPhoneOS}Defines)!
- <rdar://problem/6776277> Need clang-cc/ccc-analyzer support for
-miphoneos-version-min
llvm-svn: 68815
2009-04-10 19:52:24 +00:00
Daniel Dunbar
e3f4197524
Support %S in Python TestRunner
...
llvm-svn: 68814
2009-04-10 19:49:21 +00:00
Daniel Dunbar
17ddaa677e
More fixes to builtin preprocessor defines.
...
- Add -static-define option driver can use when __STATIC__ should be
defined (instead of __DYNAMIC__).
- Don't set __OPTIMIZE_SIZE__ on Os, __OPTIMIZE_SIZE__ is tied to Oz.
- Set __NO_INLINE__ following GCC 4.2.
- Set __GNU_GNU_INLINE__ or __GNU_STDC_INLINE__ following GCC 4.2.
- Set __EXCEPTIONS for Objective-C NonFragile ABI.
- Set __STRICT_ANSI__ for standard conforming modes.
- I added a clang style test case in utils for this, but its not
particularly portable and I don't think it belongs in the test
suite.
llvm-svn: 68621
2009-04-08 18:03:55 +00:00
Daniel Dunbar
d7beeea228
Handle use side of __objc_exception__ attribute; when using an
...
exception with this attribute we don't need to emit a weak definition
for the exception type information.
llvm-svn: 68513
2009-04-07 06:43:45 +00:00
Ted Kremenek
554b5370e4
scan-build: Also look for clang-cc in ../libexec
...
llvm-svn: 67972
2009-03-29 00:31:32 +00:00
Ted Kremenek
97eaaddc22
More path updates with clang-cc...
...
llvm-svn: 67609
2009-03-24 05:30:14 +00:00
Ted Kremenek
c13a6bc593
Update scan-build/ccc-analyzer to use 'clang-cc' instead of 'clang'.
...
llvm-svn: 67608
2009-03-24 04:29:13 +00:00
Ted Kremenek
3759754363
'-o' option now supports relative paths.
...
llvm-svn: 66680
2009-03-11 18:20:33 +00:00
Ted Kremenek
6f74418bd7
scan-build: Also look for clang in the same directory as scan-build.
...
llvm-svn: 66491
2009-03-09 23:14:38 +00:00
Daniel Dunbar
fe5b7bc5ef
Add my "clang compatible" test runner. Sorry for keeping this to myself...
...
Usage: from clang/test, 'make -f ../utils/test/Makefile.multi'
Pros: About 20% faster than the Makefile based version on my 8 core
box (way faster on Windows I imagine, if it works).
Cons: Needs some cleanup. Ctrl-C works quite poorly on Darwin; more
Python's fault than mine.
Future: Support config definitions so we can use this for running LLVM
tests instead of dejagnu. Parallel testing goodness? Indeed.
llvm-svn: 66293
2009-03-06 22:20:40 +00:00
Daniel Dunbar
7c5a8d2fa0
Add a little utility for interposing between a command line program
...
and capturing its invocations.
llvm-svn: 66068
2009-03-04 21:06:52 +00:00
Daniel Dunbar
b4e80a5b19
ABITestGen: Add v2i16 and v16f32 as default vector types to generate.
...
llvm-svn: 65810
2009-03-02 06:14:33 +00:00
Ted Kremenek
078b8879e7
Don't report 'Parser Rejects' for conftest files.
...
llvm-svn: 65619
2009-02-27 06:17:38 +00:00
Ted Kremenek
33b220510b
Correctly check for ccc-analyzer in the same directory as scan-build.
...
llvm-svn: 65618
2009-02-27 06:17:05 +00:00
Ted Kremenek
1b44ba4295
Pass -ffreestanding' to clang.
...
llvm-svn: 65584
2009-02-26 23:09:43 +00:00
Ted Kremenek
721c3c5f70
For scan-build based analyses, use the '-analyzer-eargely-assume' setting by default (turning it on to test how it impacts users).
...
llvm-svn: 65535
2009-02-26 17:36:31 +00:00
Ted Kremenek
16f3d8dcfb
scan-build now looks for ccc-analyzer first in the 'bin' subdirectory and then the directory where scan-build lives.
...
llvm-svn: 65483
2009-02-25 22:54:02 +00:00
Ted Kremenek
32a59b2315
Do not automatically run the 'missing -dealloc' check until we have adequate time to make it much smarter (too much noise).
...
llvm-svn: 65474
2009-02-25 21:08:30 +00:00
Ted Kremenek
86cb75a7cc
Fix condition in ccc-analyzer that would cause the analyzer never to be run.
...
llvm-svn: 65417
2009-02-25 00:10:37 +00:00
Ted Kremenek
9b15effcd1
ccc-analyzer: Don't analyze files with '-arch ppc' or '-arch ppc64' since Clang
...
doesn't support Altivec intrisics nor is it likely that we're currently
generating all the right #defines, etc., for those architectures.
llvm-svn: 65390
2009-02-24 22:07:12 +00:00
Daniel Dunbar
d2fd196045
Add a very primitive clang based multifile 'delta'.
...
- Interface is more or less like multidelta.
- Keep in mind it won't work very well; delta is O(N^2) frequently in
practice. multidelta manages to work because it folds lines to keep
N small, but this is just working on raw tokens. However, I have a
fancy pants DAG based delta algorithm which will be the bees knees
once I get it wired to clang.
llvm-svn: 65377
2009-02-24 07:42:32 +00:00
Ted Kremenek
6e79f3129e
scan-build: Prune off any trailing '/' characters in the output directory path.
...
llvm-svn: 65368
2009-02-24 02:38:02 +00:00
Ted Kremenek
04c6f05a1c
Find 'clang' in 'bin' subdirectory instead of 'cbin'.
...
llvm-svn: 65343
2009-02-23 23:01:06 +00:00
Daniel Dunbar
12bbe9e144
Goodbye old-ccc; please use tools/ccc/ccc.
...
llvm-svn: 65335
2009-02-23 19:17:09 +00:00
Daniel Dunbar
3ebd531b2c
ABITestGen: Use explicit list of vector types instead of just a list
...
of sizes. Turns out we don't care very much about vector types that
don't map to the hardware.
llvm-svn: 65263
2009-02-22 04:17:53 +00:00
Ted Kremenek
3f49f0f06d
Update scan-build help diagnostic.
...
llvm-svn: 65223
2009-02-21 04:46:41 +00:00
Ted Kremenek
6b8b0dfb90
Only create a preprocessed file for an ignored attribute if there currently does not exist an 'attribute_ignored_XXX.txt' file for that attribute.
...
llvm-svn: 65222
2009-02-21 04:46:20 +00:00
Ted Kremenek
b98f0eb9af
Make 'RangeConstraintManager' the default ConstraintManager.
...
llvm-svn: 65173
2009-02-20 21:49:22 +00:00
Ted Kremenek
40cd13ecff
Fix potential use of uninitialized variable.
...
llvm-svn: 65109
2009-02-20 04:34:29 +00:00
Ted Kremenek
52932d725a
scan-build now searches for the clang binary in the subdirectory 'cbin'.
...
llvm-svn: 65014
2009-02-19 04:58:30 +00:00
Ted Kremenek
13ed6f1ebe
ccc-analyzer:
...
- now logs which source files had "ignored attributes".
- disable-free is enabled
scan-build:
- now displays a table of ignored attributes under "Analyzer Failures".
llvm-svn: 64853
2009-02-17 23:31:05 +00:00
Daniel Dunbar
79d10a2f43
ABITest: Add some checking of values for return types; useful for
...
catching internal consistency problems (esp. w/ reference compiler).
llvm-svn: 64847
2009-02-17 23:13:43 +00:00
Daniel Dunbar
45f68153d3
Note some more things to integrate into ABITest
...
llvm-svn: 64846
2009-02-17 23:12:22 +00:00
Ted Kremenek
d3d16aaa48
Fix broken line.
...
llvm-svn: 64740
2009-02-17 05:01:10 +00:00
Ted Kremenek
b535181199
Static Analyzer driver/options (partial) cleanup:
...
- Move all analyzer options logic to AnalysisConsumer.cpp.
- Unified specification of stores/constraints/output to be:
-analyzer-output=...
-analyzer-store=...
-analyzer-constraints=...
instead of -analyzer-range-constraints, -analyzer-store-basic, etc.
- Updated drivers (ccc-analyzer, scan-builds, new ccc) to obey this new
interface
- Updated test cases to conform to new driver options
llvm-svn: 64737
2009-02-17 04:27:41 +00:00
Chris Lattner
df52dc7a6f
I didn't mean to change this.
...
llvm-svn: 63875
2009-02-05 19:05:56 +00:00
Chris Lattner
8181312251
fix some differences between apple gcc and clang on darwin/x86-32.
...
llvm-svn: 63846
2009-02-05 07:19:24 +00:00
Fariborz Jahanian
4193308b2a
-x language fix.
...
Patch by David Chisnall
llvm-svn: 63686
2009-02-03 23:59:32 +00:00
Daniel Dunbar
506374cc59
ABITest: Makefile tweaks
...
llvm-svn: 63330
2009-01-29 20:36:50 +00:00
Daniel Dunbar
d0c901c5a6
ABITest: Fix access to array test values.
...
llvm-svn: 63296
2009-01-29 08:48:06 +00:00
Daniel Dunbar
676fdd81d5
ABITest: Fix test value generation for unions.
...
llvm-svn: 63286
2009-01-29 07:36:46 +00:00
Daniel Dunbar
7bb8dfae53
Use xcc (instead of clang directly).
...
llvm-svn: 63279
2009-01-29 06:20:19 +00:00
Daniel Dunbar
36ccb30a35
ccc: Support -v; invent a version number for ccc for now, will be
...
shared with clang eventually.
llvm-svn: 63220
2009-01-28 19:26:20 +00:00
Daniel Dunbar
6ec8a4d9e3
ABITest: Support --test-layout option for generating
...
size/alignment/offsetof based tests of types instead of calling
convention tests.
llvm-svn: 63167
2009-01-28 02:01:23 +00:00
Ted Kremenek
dd62885f40
Use string comparison rather than '=='.
...
llvm-svn: 63095
2009-01-27 05:34:28 +00:00
Ted Kremenek
a3f462e49a
PathDiagnostics:
...
- Add the distinction between the 'bug type' and the 'bug description'
HTMLDiagnostics:
- Output the bug type field as HTML comments
scan-build:
- Use the bug type field instead of the bug description for the HTML table.
- Radar filing now automatically picks up the bug description in the title (addresses <rdar://problem/6265970>)
llvm-svn: 63084
2009-01-27 01:53:39 +00:00
Ted Kremenek
725fb43012
Have 'Analyzer Failures' files be named to reflect the category of problem.
...
llvm-svn: 63080
2009-01-27 01:19:08 +00:00
Daniel Dunbar
827c763051
ABITestGen: Add generation of vector types.
...
llvm-svn: 63024
2009-01-26 19:05:20 +00:00
Daniel Dunbar
ed4361ecbb
Add simple make based harness for running ABI tests.
...
llvm-svn: 62916
2009-01-24 08:43:22 +00:00
Ted Kremenek
ec28391084
Added clang option '--analyzer-display-progress' to indicate that the analyzer should output 'ANALYZE:' messages to display its progress on a source file.
...
llvm-svn: 62875
2009-01-23 20:52:26 +00:00