Commit Graph

66 Commits

Author SHA1 Message Date
Dan Gohman 93127aecb9 Remove the Blackfin backend.
llvm-svn: 142881
2011-10-25 00:06:12 +00:00
Douglas Gregor cfee35b845 Remove the AST printer (-ast-print-xml), which is too incomplete and
too low-level to actually be useful but is just interesting enough for
people to try to use it (which won't actually work beyond toy examples).

To bring back the AST printer, it needs to be:
  - Complete, covering all of C/C++/Objective-C
  - Documented, with appropriate Schema against which we can validate
  the output
  - Designed for C/C++/Objective-C, not Clang's specific ASTs
  - Stable across Clang versions
  - Well-tested

llvm-svn: 127141
2011-03-07 01:03:30 +00:00
Argyrios Kyrtzidis 9eb02dfa89 [analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best misnomer award.
llvm-svn: 126676
2011-02-28 19:49:42 +00:00
Argyrios Kyrtzidis 2c49ec7f1d [analyzer] Migrate NSErrorChecker and DereferenceChecker to CheckerV2.
They cooperate in that NSErrorChecker listens for ImplicitNullDerefEvent events that
DereferenceChecker can dispatch.
ImplicitNullDerefEvent is when we dereferenced a location that may be null.

llvm-svn: 126659
2011-02-28 17:36:18 +00:00
Anders Carlsson 3320e1575f Make clang -cc1 disable Objective-C exceptions by default, and add a -fobjc-exceptions flag to turn them on.
Update all tests accordingly.

llvm-svn: 126177
2011-02-22 01:52:06 +00:00
Peter Collingbourne 03007d79fe Sema: have BuildExpressionFromIntegralTemplateArgument produce well-formed IntegerLiterals
BuildExpressionFromIntegralTemplateArgument can produce malformed
IntegerLiterals with an EnumType if the template parameter type
is an EnumType.  This breaks the AST printer which expects all
IntegerLiterals to have a plain integer type.  Instead, give the
IntegerLiteral the enum's promotion type and wrap in an implicit cast
to the EnumType.

llvm-svn: 121862
2010-12-15 15:06:14 +00:00
Andrew Trick 9642cc6a9d putback r116782, it's a safe fix and should not break windows
llvm-svn: 116994
2010-10-21 03:59:06 +00:00
Andrew Trick 8cdb3f7d13 revert r116782 & r116793 to fix msvc9 buildbots
llvm-svn: 116976
2010-10-20 23:52:37 +00:00
NAKAMURA Takumi 1984479896 test/Coverage/html-diagnostics.c: Use find(1) to glob wildcards.
MSYS cat(1) does not expand wildcards.

llvm-svn: 116793
2010-10-19 03:38:22 +00:00
NAKAMURA Takumi 3ad833be0e test/Coverage/html-diagnostics.c: Do not make hit "CHECK: Dereference of null pointer" to the output itself!
llvm-svn: 116782
2010-10-19 01:11:16 +00:00
Chris Lattner a09e8efd1f Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.

llvm-svn: 116191
2010-10-11 05:44:49 +00:00
Daniel Dunbar 37614d875f Frontend/XML: Add support for printing nested structures, patch by Martin Vejnár!
llvm-svn: 115041
2010-09-29 16:09:28 +00:00
Douglas Gregor 67ca40c419 Eliminate the "minimal" and printing parser actions, which only ever
worked for C anyway. Also kills the -cc1 options -parse-noop and
-parse-print-callbacks.

llvm-svn: 109392
2010-07-26 04:08:02 +00:00
Chris Lattner bf5c83745a "this patch properly addresses escaping < and > which might appear
(e.g. for C++ operators) in the xml dump.

I also re-enabled the unit test for ast-print-xml (or so I think)
at least, make test didn't fail..."

patch by Sebastien Binet!

llvm-svn: 103671
2010-05-12 23:27:11 +00:00
Anders Carlsson 6a75ebb137 Rename -dump-record-layouts to -fdump-record-layouts now that the option behaves like aa flag.
llvm-svn: 100943
2010-04-10 19:09:13 +00:00
John McCall 731be6620c Revert changes r97693, r97700, and r97718.
Our testing framework can't deal with disabled targets yet.

llvm-svn: 97719
2010-03-04 04:29:44 +00:00
John McCall 61076e1d87 XFAIL these tests on win32, since the win32 buildbot apparently disables all
targets except X86.

llvm-svn: 97718
2010-03-04 04:14:44 +00:00
Ted Kremenek 2f2692f8ca Rename -cc1 option '-checker-cfref' to '-analyzer-check-objc-mem'.
llvm-svn: 95348
2010-02-05 02:06:54 +00:00
Daniel Dunbar d443c0a02a Revert r92431, this code isn't dead and broke the ntfs build.
llvm-svn: 92493
2010-01-04 18:47:06 +00:00
Eli Friedman c6f59b1c49 Better coverage for -dump-record-layouts and -print-decl-contexts.
llvm-svn: 92441
2010-01-03 02:01:11 +00:00
Daniel Dunbar 5618e98f33 Update tests to use %clang instead of 'clang', and forcibly disable use of '
clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to
garbage).

llvm-svn: 91460
2009-12-15 22:01:24 +00:00
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Fariborz Jahanian a01b67d7b0 Make tests use the new clang -cc1 flag.
llvm-svn: 91303
2009-12-14 18:00:56 +00:00
Daniel Dunbar 4e7596cc3a Normalize options to use '-FOO' instead of '--FOO'.
llvm-svn: 90071
2009-11-29 09:33:10 +00:00
Daniel Dunbar 4656c53e12 Move -fnext-runtime defaulting to driver (and change clang-cc default to
-fnext-runtime), instead of using getDefaultLangOptions.

llvm-svn: 89058
2009-11-17 07:07:28 +00:00
Daniel Dunbar 34546ce43d Remove RUN: true lines.
llvm-svn: 86432
2009-11-08 01:47:25 +00:00
Daniel Dunbar 8b57697954 Eliminate &&s in tests.
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.

llvm-svn: 86430
2009-11-08 01:45:36 +00:00
Daniel Dunbar aef52f4c83 Remove clang-cc -html-diags option, this doesn't fit in well and we get plenty
of coverage of this from the analyzer.

If this bothers you, I can add it back in a mode where non-source diagnostics go
to stderr and only source diagnostics use -html-diags, but I don't think anyone
uses this.

llvm-svn: 86109
2009-11-05 02:11:37 +00:00
Daniel Dunbar f3355a61c4 Remove clang-cc code for handling -mmacosx-version-min and
-miphoneos-version-min.

llvm-svn: 85601
2009-10-30 18:12:31 +00:00
Daniel Dunbar c14753b781 Fix crash when synthesizing property setters when the property type and ivar
type have mismatched Objective-C types.
  - <rdar://problem/7336352> [irgen] crash in synthesized property construction

llvm-svn: 85275
2009-10-27 19:21:30 +00:00
Daniel Dunbar 431895f748 clang-cc: Allow building for x86_64 with -mmacosx-version-min=10.4.
llvm-svn: 85132
2009-10-26 17:52:49 +00:00
Daniel Dunbar d04405f036 Add test for finding bfin backend.
llvm-svn: 79326
2009-08-18 07:07:14 +00:00
Daniel Dunbar 2a4061929f Fix some made up triples.
llvm-svn: 79316
2009-08-18 05:30:27 +00:00
Ted Kremenek 1642bdaaa5 Introduce a new concept to the static analyzer: SValuator.
GRTransferFuncs had the conflated role of both constructing SVals (symbolic
expressions) as well as handling checker-specific logic. Now SValuator has the
role of constructing SVals from expressions and GRTransferFuncs just handles
checker-specific logic. The motivation is by separating these two concepts we
will be able to much more easily create richer constraint-generating logic
without coupling it to the main checker transfer function logic.

We now have one implementation of SValuator: SimpleSValuator.

SimpleSValuator is essentially the SVal-related logic that was in GRSimpleVals
(which is removed in this patch). This includes the logic for EvalBinOp,
EvalCast, etc. Because SValuator has a narrower role than the old
GRTransferFuncs, the interfaces are much simpler, and so is the implementation
of SimpleSValuator compared to GRSimpleVals. I also did a line-by-line review of
SVal-related logic in GRSimpleVals and cleaned it up while moving it over to
SimpleSValuator.

As a consequence of removing GRSimpleVals, there is no longer a
'-checker-simple' option. The '-checker-cfref' did everything that option did
but also ran the retain/release checker. Of course a user may not always wish to
run the retain/release checker, nor do we wish core analysis logic buried in the
checker-specific logic. The next step is to refactor the logic in CFRefCount.cpp
to separate out these pieces into the core analysis engine.

llvm-svn: 74229
2009-06-26 00:05:51 +00:00
Douglas Gregor 5f478b78c0 AST printing for C++ base classes
llvm-svn: 72617
2009-05-30 06:58:37 +00:00
Douglas Gregor 182319375a Pretty printing and improved representation for namespace alias declarations
llvm-svn: 72616
2009-05-30 06:48:27 +00:00
Douglas Gregor 3bc6e4c72a Printing for using directives, e.g.,
using namespace std::debug;

Extended UsingDirectiveDecl to store the nested-name-specifier that
precedes the nominated namespace.

llvm-svn: 72614
2009-05-30 06:31:56 +00:00
Douglas Gregor 2d042f1cf4 Never suppress specifiers when printing the parameters of a function
declaration.

llvm-svn: 72613
2009-05-30 05:39:39 +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
Douglas Gregor 7f5601e55f AST XML dump, from Olaf Krzikalla!
llvm-svn: 72224
2009-05-21 20:55:50 +00:00
Daniel Dunbar 9b097a81fe Simplify tests now that GNU runtime supports exception handling.
llvm-svn: 72021
2009-05-18 17:43:32 +00:00
Fariborz Jahanian 078cd52297 This patch fixes two bugs in the GNU Objective-C runtime implementation. One is a case in rethrowing exceptions where the C types don't match correctly (I already sent this patch to Daniel Dunbar, who found the bug, so it may have already been committed). The other fixes the case properties so that the methods generated as property accessors are added to the class structure correctly.
Patch by David Chisnall.

llvm-svn: 71980
2009-05-17 16:49:27 +00:00
Chris Lattner 91cb0eea67 remove obsolete tests.
llvm-svn: 69830
2009-04-22 22:06:26 +00:00
Daniel Dunbar 46285d8084 We no longer accept @defs with the non-fragile ABI.
llvm-svn: 69721
2009-04-21 21:16:23 +00:00
Zhongxing Xu 01a5beb8cd Apply a patch which adds 'OriginalParmVar' to the DeclContextPrinter by Jon
Simons.

llvm-svn: 68436
2009-04-05 02:04:38 +00:00
Daniel Dunbar bf1fe8c36c Support member reference on ?: of struct type.
llvm-svn: 67603
2009-03-24 02:38:23 +00:00
Daniel Dunbar a45cf5b6b0 Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.

llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Daniel Dunbar 4aacad1f93 Use not instead of ! in tests.
llvm-svn: 67601
2009-03-24 01:59:55 +00:00
Daniel Dunbar 9b2fdf05c0 Update test case.
llvm-svn: 67392
2009-03-20 19:34:03 +00:00
Fariborz Jahanian 391d4fc7f7 More super dot-syntax property implementation
when there is actually a property declaration
used in the dot-syntax.

llvm-svn: 67391
2009-03-20 19:18:21 +00:00