]> granicus.if.org Git - clang/log
clang
15 years agoDriver: Handle -dumpversion, this is used by some configuration
Daniel Dunbar [Sat, 4 Apr 2009 05:17:38 +0000 (05:17 +0000)]
Driver: Handle -dumpversion, this is used by some configuration
scripts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68418 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Handle properly calling dsymutil when source input is
Daniel Dunbar [Sat, 4 Apr 2009 00:55:30 +0000 (00:55 +0000)]
Driver: Handle properly calling dsymutil when source input is
preceeded by a linker input flag.
 - <rdar://problem/6757236> clang should make a dSYM when going
   straight from source to binary

 - This still matches gcc, but the right way to solve this would be to
   detect the situation we care about (we are compiling from source
   and linking in one step), instead of looking at the suffix of the
   input file. The Tool doesn't quite have enough information to do
   this yet, however.

 - Also, find the suffix correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68417 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Automatically suppress warnings for duplicate versions of
Daniel Dunbar [Sat, 4 Apr 2009 00:52:26 +0000 (00:52 +0000)]
Driver: Automatically suppress warnings for duplicate versions of
flags which were used for something.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68416 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTestcase for regparm codegen
Anton Korobeynikov [Sat, 4 Apr 2009 00:49:38 +0000 (00:49 +0000)]
Testcase for regparm codegen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68415 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBasic support for regparm codegen
Anton Korobeynikov [Sat, 4 Apr 2009 00:49:24 +0000 (00:49 +0000)]
Basic support for regparm codegen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68414 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoProvide sema proper values of maximal number of arguments passed in registers.
Anton Korobeynikov [Fri, 3 Apr 2009 23:38:25 +0000 (23:38 +0000)]
Provide sema proper values of maximal number of arguments passed in registers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68413 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for calling C++ member functions.
Anders Carlsson [Fri, 3 Apr 2009 22:50:24 +0000 (22:50 +0000)]
Add support for calling C++ member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68412 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a getFunctionInfo that takes a CXXMethodDecl.
Anders Carlsson [Fri, 3 Apr 2009 22:48:58 +0000 (22:48 +0000)]
Add a getFunctionInfo that takes a CXXMethodDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68411 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Add -Qunused-arguments option to suppress driver "unused
Daniel Dunbar [Fri, 3 Apr 2009 22:09:23 +0000 (22:09 +0000)]
Driver: Add -Qunused-arguments option to suppress driver "unused
arguments" warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68410 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReal corener case of a method declared in a protocol
Fariborz Jahanian [Fri, 3 Apr 2009 21:51:32 +0000 (21:51 +0000)]
Real corener case of a method declared in a protocol
used in a class which declares a property of the same
name. This should not result in an unimplemented
method warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68409 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimprove the string literal comparison warning to not call @encode's "string literals".
Chris Lattner [Fri, 3 Apr 2009 21:11:28 +0000 (21:11 +0000)]
improve the string literal comparison warning to not call @encode's "string literals".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68407 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSentence-case bug type.
Ted Kremenek [Fri, 3 Apr 2009 21:10:31 +0000 (21:10 +0000)]
Sentence-case bug type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68406 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Explicitly ignore -fpch-preprocess when using clang, we don't
Daniel Dunbar [Fri, 3 Apr 2009 20:51:31 +0000 (20:51 +0000)]
Driver: Explicitly ignore -fpch-preprocess when using clang, we don't
need to do anything special to support this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68403 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReduce Driver verbosity by suppressing unused warning about another
Daniel Dunbar [Fri, 3 Apr 2009 20:33:20 +0000 (20:33 +0000)]
Reduce Driver verbosity by suppressing unused warning about another
cluster of -W options.

The list: -Waggregate-return -Wbad-function-cast -Wcast-qual
-Wformat-security -Wformat=2 -Wformat -Wmissing-declarations
-Wnewline-eof -Wno-parentheses -Wpacked -Wredundant-decls -Wshadow
-Wsign-compare -Wstrict-overflow= -Wstrict-overflow -Wuninitialized
-Wunknown-pragmas.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68402 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoretain/release checker: don't track NSPanel until we have better reasoning about
Ted Kremenek [Fri, 3 Apr 2009 19:02:51 +0000 (19:02 +0000)]
retain/release checker: don't track NSPanel until we have better reasoning about
the subtle ownership issues of such objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68397 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd fixit advice to an archiac ObjC issue.
Chris Lattner [Fri, 3 Apr 2009 18:38:42 +0000 (18:38 +0000)]
add fixit advice to an archiac ObjC issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68395 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix Clang on VC++, patch by Bixia Zheng!
Chris Lattner [Fri, 3 Apr 2009 18:23:42 +0000 (18:23 +0000)]
Fix Clang on VC++, patch by Bixia Zheng!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68394 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix some warnings on VC++, patch by John Thompson!
Chris Lattner [Fri, 3 Apr 2009 17:31:50 +0000 (17:31 +0000)]
fix some warnings on VC++, patch by John Thompson!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68391 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoinitialize an ivar.
Chris Lattner [Fri, 3 Apr 2009 15:52:00 +0000 (15:52 +0000)]
initialize an ivar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68387 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a comment/FIXME so Eli can sleep better:-))
Steve Naroff [Fri, 3 Apr 2009 09:44:50 +0000 (09:44 +0000)]
Add a comment/FIXME so Eli can sleep better:-))

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68379 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThis is the first step to gradually remove the use of loc::SymbolVal. Now
Zhongxing Xu [Fri, 3 Apr 2009 07:33:13 +0000 (07:33 +0000)]
This is the first step to gradually remove the use of loc::SymbolVal. Now
when creating symbolic values, we distinguish between location and non-location
values. For location values, we create a symbolic region instead of a
loc::SymbolVal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68373 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo we have fixit advice for comments yet?
Daniel Dunbar [Fri, 3 Apr 2009 06:26:01 +0000 (06:26 +0000)]
Do we have fixit advice for comments yet?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68372 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIgnore plus operands when looking up the operand number from a named operand. This...
Anders Carlsson [Fri, 3 Apr 2009 05:57:08 +0000 (05:57 +0000)]
Ignore plus operands when looking up the operand number from a named operand. This matches llvm-gcc and fixes PR3908.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68371 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix comment.
Daniel Dunbar [Fri, 3 Apr 2009 05:45:43 +0000 (05:45 +0000)]
Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68370 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement -fvisibility.
Fariborz Jahanian [Fri, 3 Apr 2009 03:28:57 +0000 (03:28 +0000)]
Implement -fvisibility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68369 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConvert region-design document to HTML.
Ted Kremenek [Fri, 3 Apr 2009 01:38:55 +0000 (01:38 +0000)]
Convert region-design document to HTML.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68366 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Add missed translation for darwin::Preprocess (gcc), -d*
Daniel Dunbar [Fri, 3 Apr 2009 01:27:06 +0000 (01:27 +0000)]
Driver: Add missed translation for darwin::Preprocess (gcc), -d*
wasn't being forwarded.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68365 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTweak test (now that http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090...
Steve Naroff [Fri, 3 Apr 2009 01:25:18 +0000 (01:25 +0000)]
Tweak test (now that http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090330/015001.html is fixed).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68364 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd target hook for setting symbol prefix and section of unicode
Daniel Dunbar [Fri, 3 Apr 2009 00:57:44 +0000 (00:57 +0000)]
Add target hook for setting symbol prefix and section of unicode
string literals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68363 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a little typo that was killing de-serialization
Douglas Gregor [Fri, 3 Apr 2009 00:25:09 +0000 (00:25 +0000)]
Fix a little typo that was killing de-serialization

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68354 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove the rest of the fixit tests to the FixIt area.
Mike Stump [Thu, 2 Apr 2009 23:44:32 +0000 (23:44 +0000)]
Move the rest of the fixit tests to the FixIt area.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68349 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename GeneratePCH action to GeneratePTH
Douglas Gregor [Thu, 2 Apr 2009 23:43:50 +0000 (23:43 +0000)]
Rename GeneratePCH action to GeneratePTH

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68348 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate wording.
Mike Stump [Thu, 2 Apr 2009 23:42:13 +0000 (23:42 +0000)]
Update wording.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68347 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoResynchronize Decl/VarDecl serialization code with the structures
Douglas Gregor [Thu, 2 Apr 2009 23:40:00 +0000 (23:40 +0000)]
Resynchronize Decl/VarDecl serialization code with the structures

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68346 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSentence-type bug type and category.
Ted Kremenek [Thu, 2 Apr 2009 22:50:16 +0000 (22:50 +0000)]
Sentence-type bug type and category.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68345 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd some whitespace to test my commit privileges.
Ed Schouten [Thu, 2 Apr 2009 19:13:12 +0000 (19:13 +0000)]
Add some whitespace to test my commit privileges.

Approved by: ddunbar

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68343 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a new command-line option "-fixit-at=file:line:column" that only
Douglas Gregor [Thu, 2 Apr 2009 19:05:20 +0000 (19:05 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68342 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix up lookup rules for properties declared in
Fariborz Jahanian [Thu, 2 Apr 2009 18:44:20 +0000 (18:44 +0000)]
Fix up lookup rules for properties declared in
objc's continuation class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68339 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix http://llvm.org/bugs/show_bug.cgi?id=3907.
Steve Naroff [Thu, 2 Apr 2009 18:37:59 +0000 (18:37 +0000)]
Fix http://llvm.org/bugs/show_bug.cgi?id=3907.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68338 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Tweak search paths for FreeBSD.
Daniel Dunbar [Thu, 2 Apr 2009 18:30:04 +0000 (18:30 +0000)]
Driver: Tweak search paths for FreeBSD.
 - Patch by Pawel Worach!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68332 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix grammar.
Ted Kremenek [Thu, 2 Apr 2009 18:20:13 +0000 (18:20 +0000)]
Fix grammar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68331 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove -ftrapu.
Mike Stump [Thu, 2 Apr 2009 18:15:54 +0000 (18:15 +0000)]
Remove -ftrapu.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68330 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't use static globals for params as it confuses the optimzer that their values...
Sanjiv Gupta [Thu, 2 Apr 2009 17:51:27 +0000 (17:51 +0000)]
Don't use static globals for params as it confuses the optimzer that their values are never being used in the function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68328 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a few more analyzer test cases.
Ted Kremenek [Thu, 2 Apr 2009 17:25:00 +0000 (17:25 +0000)]
Add a few more analyzer test cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68326 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove the fix-it tests into their own subdirectory
Douglas Gregor [Thu, 2 Apr 2009 17:19:13 +0000 (17:19 +0000)]
Move the fix-it tests into their own subdirectory

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68325 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoProvide FIX-IT notes to describe what fix-it is doing behind the
Douglas Gregor [Thu, 2 Apr 2009 17:13:00 +0000 (17:13 +0000)]
Provide FIX-IT notes to describe what fix-it is doing behind the
scenes, using the underlying diagnostic client to format the
messages.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68324 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSome cleanups to the fix-it rewriter. Thanks, Chris
Douglas Gregor [Thu, 2 Apr 2009 16:34:42 +0000 (16:34 +0000)]
Some cleanups to the fix-it rewriter. Thanks, Chris

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68322 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement mangling of declarations inside functions.
Anders Carlsson [Thu, 2 Apr 2009 16:24:45 +0000 (16:24 +0000)]
Implement mangling of declarations inside functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68321 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMangle VarDecls correctly.
Anders Carlsson [Thu, 2 Apr 2009 16:05:20 +0000 (16:05 +0000)]
Mangle VarDecls correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68320 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove the function decl mangling code out into its own function. No functionality...
Anders Carlsson [Thu, 2 Apr 2009 15:51:53 +0000 (15:51 +0000)]
Move the function decl mangling code out into its own function. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68319 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen calling a function without a prototype for which we have a
Douglas Gregor [Thu, 2 Apr 2009 15:37:10 +0000 (15:37 +0000)]
When calling a function without a prototype for which we have a
definition, warn if there are too many/too few function call
arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68318 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWire --version to normal -v version text.
Daniel Dunbar [Thu, 2 Apr 2009 15:05:41 +0000 (15:05 +0000)]
Wire --version to normal -v version text.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68316 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate checker build.
Ted Kremenek [Thu, 2 Apr 2009 06:33:06 +0000 (06:33 +0000)]
Update checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68302 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd TemplateName.cpp/h to the xcode project, minor tidying.
Chris Lattner [Thu, 2 Apr 2009 06:07:12 +0000 (06:07 +0000)]
add TemplateName.cpp/h to the xcode project, minor tidying.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68301 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEmit code for linkage specifications.
Anders Carlsson [Thu, 2 Apr 2009 05:55:18 +0000 (05:55 +0000)]
Emit code for linkage specifications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68300 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAlso "flatten" PathLocations fed to the HTMLDiagnosticClient. We need a better
Ted Kremenek [Thu, 2 Apr 2009 05:17:38 +0000 (05:17 +0000)]
Also "flatten" PathLocations fed to the HTMLDiagnosticClient. We need a better
long-term strategy, but this should work for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68297 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHack: Add 'PathDiagnostic::flattenLocations()'. Because PlistDiagnosticClient
Ted Kremenek [Thu, 2 Apr 2009 05:13:24 +0000 (05:13 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68292 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake darned sure that the -fixit tests are testing what we want them to test
Douglas Gregor [Thu, 2 Apr 2009 04:59:27 +0000 (04:59 +0000)]
Make darned sure that the -fixit tests are testing what we want them to test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68289 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix a FIXME, providing accurate source range info for DeclStmt's. The end
Chris Lattner [Thu, 2 Apr 2009 04:16:50 +0000 (04:16 +0000)]
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))")

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68288 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd another null pointer check. Simplify condition.
Ted Kremenek [Thu, 2 Apr 2009 03:44:00 +0000 (03:44 +0000)]
Add another null pointer check.  Simplify condition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68283 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix grammar.
Ted Kremenek [Thu, 2 Apr 2009 03:42:38 +0000 (03:42 +0000)]
Fix grammar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68282 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd null pointer check.
Ted Kremenek [Thu, 2 Apr 2009 03:30:55 +0000 (03:30 +0000)]
Add null pointer check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68281 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen compiling C++ code, always mangle the names of static block var decls.
Anders Carlsson [Thu, 2 Apr 2009 03:29:47 +0000 (03:29 +0000)]
When compiling C++ code, always mangle the names of static block var decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68280 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate comments in fixit tests
Douglas Gregor [Thu, 2 Apr 2009 03:20:30 +0000 (03:20 +0000)]
Update comments in fixit tests

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68279 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClean up -fixit output slightly
Douglas Gregor [Thu, 2 Apr 2009 03:14:12 +0000 (03:14 +0000)]
Clean up -fixit output slightly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68278 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate expected warning in test case.
Ted Kremenek [Thu, 2 Apr 2009 02:52:13 +0000 (02:52 +0000)]
Update expected warning in test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68276 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMore title-casing of bug type names.
Ted Kremenek [Thu, 2 Apr 2009 02:44:03 +0000 (02:44 +0000)]
More title-casing of bug type names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68275 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTitle-case the names of bug types.
Ted Kremenek [Thu, 2 Apr 2009 02:40:45 +0000 (02:40 +0000)]
Title-case the names of bug types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68274 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTitle-case the names of bug types.
Ted Kremenek [Thu, 2 Apr 2009 02:40:26 +0000 (02:40 +0000)]
Title-case the names of bug types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68273 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoA code modification hint for files that don't end in a newline.
Mike Stump [Thu, 2 Apr 2009 02:29:42 +0000 (02:29 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68272 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoupdate docs. Replace 'lattice' with 'tree'.
Zhongxing Xu [Thu, 2 Apr 2009 01:14:56 +0000 (01:14 +0000)]
update docs. Replace 'lattice' with 'tree'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68271 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOops, almost forgot the testcases.
Mike Stump [Thu, 2 Apr 2009 01:14:26 +0000 (01:14 +0000)]
Oops, almost forgot the testcases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68270 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIntroduce a "-fixit" mode to clang-cc that applies code-modification hints.
Douglas Gregor [Thu, 2 Apr 2009 01:08:08 +0000 (01:08 +0000)]
Introduce a "-fixit" mode to clang-cc that applies code-modification hints.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68268 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixup -ftrapv to be more gcc compatible. -ftrapu (for want of a
Mike Stump [Thu, 2 Apr 2009 01:03:55 +0000 (01:03 +0000)]
Fixup -ftrapv to be more gcc compatible.  -ftrapu (for want of a
better name) is the option that SmallTalk can use to intercept all
overflows, including unsigned.  I added some testcases so we don't
break anything.

Also included is another patch from David for += and friends.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68267 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFor plist diagnostics, use the extensive PathDiagnostic generation algorithm.
Ted Kremenek [Thu, 2 Apr 2009 00:44:18 +0000 (00:44 +0000)]
For plist diagnostics, use the extensive PathDiagnostic generation algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68264 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWe no longer expect an warning as this is now valid.
Mike Stump [Thu, 2 Apr 2009 00:04:12 +0000 (00:04 +0000)]
We no longer expect an warning as this is now valid.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68263 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd some more code modification hints
Douglas Gregor [Wed, 1 Apr 2009 23:51:29 +0000 (23:51 +0000)]
Add some more code modification hints

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68261 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Allow -ccc-gcc-name to specify the name/path to use when
Daniel Dunbar [Wed, 1 Apr 2009 23:34:41 +0000 (23:34 +0000)]
Driver: Allow -ccc-gcc-name to specify the name/path to use when
calling gcc in generic configurations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68260 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a bug in declaration of property in continuation
Fariborz Jahanian [Wed, 1 Apr 2009 23:23:53 +0000 (23:23 +0000)]
Fix a bug in declaration of property in continuation
class which was exposed by implementation of
objc2's nonfragile abi code gen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68259 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd code modification hints to various parsing-related diagnostics.
Douglas Gregor [Wed, 1 Apr 2009 22:41:11 +0000 (22:41 +0000)]
Add code modification hints to various parsing-related diagnostics.

Plus, reword a extension warnings to avoid talking about "ISO C" when
the extension might also be available in C++ or C++0x.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68257 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake parsing a semantic analysis a little more robust following Sema
Douglas Gregor [Wed, 1 Apr 2009 21:51:26 +0000 (21:51 +0000)]
Make parsing a semantic analysis a little more robust following Sema
failures that involve malformed types, e.g., "typename X::foo" where
"foo" isn't a type, or "std::vector<void>" that doens't instantiate
properly.

Similarly, be a bit smarter in our handling of ambiguities that occur
in Sema::getTypeName, to eliminate duplicate error messages about
ambiguous name lookup.

This eliminates two XFAILs in test/SemaCXX, one of which was crying
out to us, trying to tell us that we were producing repeated error
messages.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68251 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate test case and comment.
Steve Naroff [Wed, 1 Apr 2009 21:27:56 +0000 (21:27 +0000)]
Update test case and comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68247 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCodeGenModule::GetAddrOfConstantCFString():
Steve Naroff [Wed, 1 Apr 2009 21:16:31 +0000 (21:16 +0000)]
CodeGenModule::GetAddrOfConstantCFString():
- Finish up support for converting UTF8->UTF16 to support ObjC @"string" constants.

Remove warning from CheckObjCString.

As the FIXME in the test case indicates, I still have a bug to work out (apparently with \u handling).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68245 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBugReporter, extensive path-diagnostics: add an extra control-flow edge to the
Ted Kremenek [Wed, 1 Apr 2009 21:12:06 +0000 (21:12 +0000)]
BugReporter, extensive path-diagnostics: add an extra control-flow edge to the
enclosing statement when jumping to a subexpression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68244 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoQuick and dirty (!) fix to make sure we use powerpc in triples.
Daniel Dunbar [Wed, 1 Apr 2009 20:33:11 +0000 (20:33 +0000)]
Quick and dirty (!) fix to make sure we use powerpc in triples.
 - PR3922

 - I have a clean solution for this in flight, but it may take a while
   to come to fruition so we'll take a quick fix for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68241 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd -ftrapv support, patch from David Chisnall; well all except the
Mike Stump [Wed, 1 Apr 2009 20:28:16 +0000 (20:28 +0000)]
Add -ftrapv support, patch from David Chisnall; well all except the
clang option code that is and two bug fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68240 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixes a problem where the compiler is reporting the wrong size to the Gnu
Fariborz Jahanian [Wed, 1 Apr 2009 19:49:42 +0000 (19:49 +0000)]
Fixes a problem where the compiler is reporting the wrong size to the Gnu
runtime on 64-bit architectures.
Patch by David Chisnall

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68238 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix comment.
Ted Kremenek [Wed, 1 Apr 2009 19:43:28 +0000 (19:43 +0000)]
Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68236 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow CCC_ADD_ARGS to add empty arguments
Daniel Dunbar [Wed, 1 Apr 2009 19:38:07 +0000 (19:38 +0000)]
Allow CCC_ADD_ARGS to add empty arguments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68235 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNonfragile ivar synthesis with property is in a continuation
Fariborz Jahanian [Wed, 1 Apr 2009 19:37:34 +0000 (19:37 +0000)]
Nonfragile ivar synthesis with property is in a continuation
class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68234 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Add freebsd::Link
Daniel Dunbar [Wed, 1 Apr 2009 19:36:32 +0000 (19:36 +0000)]
Driver: Add freebsd::Link
 - Patch by Ed Schouten!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68233 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate CMake file. Patch by Brian Diekelman!
Ted Kremenek [Wed, 1 Apr 2009 19:11:05 +0000 (19:11 +0000)]
Update CMake file.  Patch by Brian Diekelman!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68232 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSupport CCC_ADD_ARGS in new driver.
Daniel Dunbar [Wed, 1 Apr 2009 19:08:46 +0000 (19:08 +0000)]
Support CCC_ADD_ARGS in new driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68231 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r68221, -ftrapv support, which causes several regressions in
Douglas Gregor [Wed, 1 Apr 2009 18:59:55 +0000 (18:59 +0000)]
Revert r68221, -ftrapv support, which causes several regressions in
Clang's test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68230 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBugReporter: for extensive path diagnostics:
Ted Kremenek [Wed, 1 Apr 2009 18:48:52 +0000 (18:48 +0000)]
BugReporter: for extensive path diagnostics:
- When processing BlockEdges with terminators, using the condition as the
  control-flow point for terminators that are expressions (e.g., '&&', '?')
- When processing events, allow intra-compound statement "jumping"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68228 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSplit PTH tests from carbon.c into separate test.
Daniel Dunbar [Wed, 1 Apr 2009 18:25:32 +0000 (18:25 +0000)]
Split PTH tests from carbon.c into separate test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68223 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd -ftrapv support, patch from David Chisnall; well all except the
Mike Stump [Wed, 1 Apr 2009 18:19:33 +0000 (18:19 +0000)]
Add -ftrapv support, patch from David Chisnall; well all except the
clang option code that is.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68221 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForgot to remove trailing &&
Daniel Dunbar [Wed, 1 Apr 2009 18:11:41 +0000 (18:11 +0000)]
Forgot to remove trailing &&

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68220 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBugReporter: for extensive PathDiagnostic generation, add control-flow from the
Ted Kremenek [Wed, 1 Apr 2009 17:52:26 +0000 (17:52 +0000)]
BugReporter: for extensive PathDiagnostic generation, add control-flow from the
start of the function/method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68217 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBugReporter: For the "extensive" PathDiagnostic generation algorithm, elide most
Ted Kremenek [Wed, 1 Apr 2009 17:18:21 +0000 (17:18 +0000)]
BugReporter: For the "extensive" PathDiagnostic generation algorithm, elide most
intra-compound statement jumps unless they are between terminators (i.e.,
branches).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68216 91177308-0d34-0410-b5e6-96231b3b80d8