Commit Graph

57306 Commits

Author SHA1 Message Date
Chris Lattner 8185fe521c add patch to go along with r68350
llvm-svn: 68352
2009-04-03 00:10:31 +00:00
Chris Lattner 206f75e7d2 use higher level APIs.
llvm-svn: 68351
2009-04-03 00:02:39 +00:00
Chris Lattner ddb2e9f7f7 add missing *
llvm-svn: 68350
2009-04-02 23:53:03 +00:00
Mike Stump 898840f98c Move the rest of the fixit tests to the FixIt area.
llvm-svn: 68349
2009-04-02 23:44:32 +00:00
Douglas Gregor 97186b07e4 Rename GeneratePCH action to GeneratePTH
llvm-svn: 68348
2009-04-02 23:43:50 +00:00
Mike Stump 5230b85fc1 Update wording.
llvm-svn: 68347
2009-04-02 23:42:13 +00:00
Douglas Gregor 17bbaed164 Resynchronize Decl/VarDecl serialization code with the structures
llvm-svn: 68346
2009-04-02 23:40:00 +00:00
Ted Kremenek 6e4c284abe Sentence-type bug type and category.
llvm-svn: 68345
2009-04-02 22:50:16 +00:00
Ed Schouten e33194b9d5 Add some whitespace to test my commit privileges.
Approved by:	ddunbar

llvm-svn: 68343
2009-04-02 19:13:12 +00:00
Douglas Gregor 9c0d38a7a0 Add a new command-line option "-fixit-at=file:line:column" that only
applies fix-its to error messages that occur at that specific location
in the program. 

llvm-svn: 68342
2009-04-02 19:05:20 +00:00
Fariborz Jahanian 38a5c9650e Fix up lookup rules for properties declared in
objc's continuation class.

llvm-svn: 68339
2009-04-02 18:44:20 +00:00
Steve Naroff d5ca2d0165 Fix http://llvm.org/bugs/show_bug.cgi?id=3907.
llvm-svn: 68338
2009-04-02 18:37:59 +00:00
Sanjiv Gupta e9cff3328f Fixed build warnings.
llvm-svn: 68333
2009-04-02 18:33:12 +00:00
Daniel Dunbar b48a4aaec9 Driver: Tweak search paths for FreeBSD.
- Patch by Pawel Worach!

llvm-svn: 68332
2009-04-02 18:30:04 +00:00
Ted Kremenek b594fa1289 Fix grammar.
llvm-svn: 68331
2009-04-02 18:20:13 +00:00
Mike Stump d3e3885f2d Remove -ftrapu.
llvm-svn: 68330
2009-04-02 18:15:54 +00:00
Sanjiv Gupta cc841a3810 To convert the StopPoint insn into an assembler directive by ISel, we need to have access to the line number field. So we convert that info as an operand by custom handling DBG_STOPPOINT in legalize.
llvm-svn: 68329
2009-04-02 18:03:10 +00:00
Sanjiv Gupta 639f2d92f8 Don't use static globals for params as it confuses the optimzer that their values are never being used in the function.
llvm-svn: 68328
2009-04-02 17:51:27 +00:00
Sanjiv Gupta 1e8860a8f5 Params are not being generated as static globals now. The caller passes them onto the callee's stack directly and the callee loads the argvals from its own stack. Clang generated frameindexes validatd by recalculating the stack as if all frameindexes represent 1-byte slots.
llvm-svn: 68327
2009-04-02 17:42:00 +00:00
Ted Kremenek 701fc10087 Add a few more analyzer test cases.
llvm-svn: 68326
2009-04-02 17:25:00 +00:00
Douglas Gregor 68bc53967e Move the fix-it tests into their own subdirectory
llvm-svn: 68325
2009-04-02 17:19:13 +00:00
Douglas Gregor a42bd8433d Provide FIX-IT notes to describe what fix-it is doing behind the
scenes, using the underlying diagnostic client to format the
messages.

llvm-svn: 68324
2009-04-02 17:13:00 +00:00
Douglas Gregor 068913eb7a Some cleanups to the fix-it rewriter. Thanks, Chris
llvm-svn: 68322
2009-04-02 16:34:42 +00:00
Anders Carlsson 4eca109941 Implement mangling of declarations inside functions.
llvm-svn: 68321
2009-04-02 16:24:45 +00:00
Anders Carlsson f2125a02db Mangle VarDecls correctly.
llvm-svn: 68320
2009-04-02 16:05:20 +00:00
Anders Carlsson 810679c37a Move the function decl mangling code out into its own function. No functionality change.
llvm-svn: 68319
2009-04-02 15:51:53 +00:00
Douglas Gregor d8e97def58 When calling a function without a prototype for which we have a
definition, warn if there are too many/too few function call
arguments.

llvm-svn: 68318
2009-04-02 15:37:10 +00:00
Daniel Dunbar b0006ae76d Wire --version to normal -v version text.
llvm-svn: 68316
2009-04-02 15:05:41 +00:00
Ted Kremenek 01cccbfb03 Update checker build.
llvm-svn: 68302
2009-04-02 06:33:06 +00:00
Chris Lattner 098d94a57d add TemplateName.cpp/h to the xcode project, minor tidying.
llvm-svn: 68301
2009-04-02 06:07:12 +00:00
Anders Carlsson cbaeb9e633 Emit code for linkage specifications.
llvm-svn: 68300
2009-04-02 05:55:18 +00:00
Ted Kremenek a64bbc68fc Also "flatten" PathLocations fed to the HTMLDiagnosticClient. We need a better
long-term strategy, but this should work for now.

llvm-svn: 68297
2009-04-02 05:17:38 +00:00
Ted Kremenek 12f510aa8f Hack: Add 'PathDiagnostic::flattenLocations()'. Because PlistDiagnosticClient
can use a PathLocation after any reference Stmts are reclaimed,
flattenLocation() converts those references to statements to source ranges.

llvm-svn: 68292
2009-04-02 05:13:24 +00:00
Douglas Gregor 3b3e0b3c1e Make darned sure that the -fixit tests are testing what we want them to test
llvm-svn: 68289
2009-04-02 04:59:27 +00:00
Chris Lattner 49836b448e fix a FIXME, providing accurate source range info for DeclStmt's. The end
of the range is now the ';' location.  For something like this:

$ cat t2.c 

#define bool int
void f(int x, int y) {
bool b = !x && y;
}

We used to produce:
$ clang-cc t2.c -ast-dump 
typedef char *__builtin_va_list;

void f(int x, int y)
(CompoundStmt 0x2201f10 <t2.c:3:22, line:5:1>
  (DeclStmt 0x2201ef0 <line:2:14>                   <----
    0x2201a20 "int b =
      (BinaryOperator 0x2201ed0 <line:4:10, col:16> 'int' '&&'
        (UnaryOperator 0x2201e90 <col:10, col:11> 'int' prefix '!'
          (DeclRefExpr 0x2201c90 <col:11> 'int' ParmVar='x' 0x2201a50))
        (DeclRefExpr 0x2201eb0 <col:16> 'int' ParmVar='y' 0x2201e10))")


Now we produce:

$ clang-cc t2.c -ast-dump
typedef char *__builtin_va_list;

void f(int x, int y)
(CompoundStmt 0x2201f10 <t2.c:3:22, line:5:1>
  (DeclStmt 0x2201ef0 <line:2:14, line:4:17>         <------
    0x2201a20 "int b =
      (BinaryOperator 0x2201ed0 <col:10, col:16> 'int' '&&'
        (UnaryOperator 0x2201e90 <col:10, col:11> 'int' prefix '!'
          (DeclRefExpr 0x2201c90 <col:11> 'int' ParmVar='x' 0x2201a50))
        (DeclRefExpr 0x2201eb0 <col:16> 'int' ParmVar='y' 0x2201e10))")

llvm-svn: 68288
2009-04-02 04:16:50 +00:00
Ted Kremenek a2a735e7fa Add another null pointer check. Simplify condition.
llvm-svn: 68283
2009-04-02 03:44:00 +00:00
Ted Kremenek 7f905c2f0d Fix grammar.
llvm-svn: 68282
2009-04-02 03:42:38 +00:00
Ted Kremenek 5d6d7d8184 Add null pointer check.
llvm-svn: 68281
2009-04-02 03:30:55 +00:00
Anders Carlsson f7e01ffa4a When compiling C++ code, always mangle the names of static block var decls.
llvm-svn: 68280
2009-04-02 03:29:47 +00:00
Douglas Gregor 7e70204613 Update comments in fixit tests
llvm-svn: 68279
2009-04-02 03:20:30 +00:00
Douglas Gregor 862ffb11d5 Clean up -fixit output slightly
llvm-svn: 68278
2009-04-02 03:14:12 +00:00
Chris Lattner 720683752e fix overflow checks in SmallVector:
"The code was doing "if (End+NumInputs > Capacity) ...". If End is
close to 0xFFFFFFFF and NumInputs is large, it'll overflow, the
condition will come out false, and the vector won't grow to
accommodate the new elements, and the program will crash in memmove."

Patch by Jeffrey Yasskin!

llvm-svn: 68277
2009-04-02 03:06:26 +00:00
Ted Kremenek 9335fecc2a Update expected warning in test case.
llvm-svn: 68276
2009-04-02 02:52:13 +00:00
Ted Kremenek 6c3413c74a More title-casing of bug type names.
llvm-svn: 68275
2009-04-02 02:44:03 +00:00
Ted Kremenek d7c0872653 Title-case the names of bug types.
llvm-svn: 68274
2009-04-02 02:40:45 +00:00
Ted Kremenek b82dd53988 Title-case the names of bug types.
llvm-svn: 68273
2009-04-02 02:40:26 +00:00
Mike Stump 0be8875ea4 A code modification hint for files that don't end in a newline.
Eventually, would be nice to be able to run these modifications even
when we don't want the warning or errors for the actual diagnostic.

llvm-svn: 68272
2009-04-02 02:29:42 +00:00
Zhongxing Xu 43533c7f40 update docs. Replace 'lattice' with 'tree'.
llvm-svn: 68271
2009-04-02 01:14:56 +00:00
Mike Stump 36c36ebc8b Oops, almost forgot the testcases.
llvm-svn: 68270
2009-04-02 01:14:26 +00:00
Mikhail Glushenkov 12062ba83d Fix build on Linux.
llvm-svn: 68269
2009-04-02 01:11:37 +00:00