]>
granicus.if.org Git - clang/log
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Daniel Dunbar [Wed, 1 Apr 2009 16:59:39 +0000 (16:59 +0000)]
Ted & I crossed paths here, these tests are in cocoa-pth.m now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68215
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 1 Apr 2009 16:53:37 +0000 (16:53 +0000)]
Removed the test case, as Chris did have a test case in the patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68214
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 1 Apr 2009 16:51:23 +0000 (16:51 +0000)]
Test case for Chris's patch:
http://llvm.org/viewvc/llvm-project?view=rev&revision=68177
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68213
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 1 Apr 2009 16:38:48 +0000 (16:38 +0000)]
Add testcase for -Wmissing-prototypes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68212
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 1 Apr 2009 16:24:40 +0000 (16:24 +0000)]
Add some examples of Fix-it hints to our documentation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68210
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 1 Apr 2009 15:50:34 +0000 (15:50 +0000)]
Add ConvertUTF module from http://www.unicode.org/Public/PROGRAMS/CVTUTF.
#ifdef'd out the 5 conversion routines that we don't currently need.
Still need a bit more work in GetAddrOfConstantCFString(). Added a FIXME to indicate this.
Expect to remove the FIXME today...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68208
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 1 Apr 2009 15:47:24 +0000 (15:47 +0000)]
Give Type::getDesugaredType a "for-display" mode that can apply more
heuristics to determine when it's useful to desugar a type for display
to the user. Introduce two C++-specific heuristics:
- For a qualified type (like "foo::bar"), only produce a new
desugred type if desugaring the qualified type ("bar", in this
case) produces something interesting. For example, if "foo::bar"
refers to a class named "bar", don't desugar. However, if
"foo::bar" refers to a typedef of something else, desugar to that
something else. This gives some useful desugaring such as
"foo::bar (aka 'int')".
- Don't desugar class template specialization types like
"basic_string<char>" down to their underlying "class
basic_string<char, char_traits<char>, allocator<char>>, etc.";
it's better just to leave such types alone.
Update diagnostics.html with some discussion and examples of type
preservation in C++, showing qualified names and class template
specialization types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68207
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 1 Apr 2009 15:36:37 +0000 (15:36 +0000)]
Add cocoa-pth.c test case, this got lost in shuffling PTH test cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68205
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 1 Apr 2009 15:28:20 +0000 (15:28 +0000)]
Re-enable PTH testing for cocoa.h and carbon.h. This tests that PTH works on
real-world header files and these tests have caught serious bugs in the past.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68204
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 1 Apr 2009 13:55:36 +0000 (13:55 +0000)]
More "prep" work for handling UTF16 CFString.
Patch by Jean-Daniel Dupas. Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68203
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 1 Apr 2009 11:09:15 +0000 (11:09 +0000)]
ProcessUCNEscape(): Incorportate some feedback from Chris.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68198
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 1 Apr 2009 07:45:00 +0000 (07:45 +0000)]
x86-32 Darwin ABI: Handle small structures correctly.
- Small structures are returned in a register if:
1. They fit nicely in a register.
2. All fields fit nicely in a register.
(more or less)
- We now pass the first 5000 ABITests if unions are disabled.
- <rdar://problem/
6497882 > [irgen] x86-32 ABI compatibility with
small structs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68197
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 1 Apr 2009 07:08:38 +0000 (07:08 +0000)]
x86-32 Darwin ABI: Single element arrays can be part of "single
element structures", which have different ABI rules.
- Current return-arguments-32 status is: 1 out of 1000 failures (-7)
- Also, vectors inside "single element structs" require special
handling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68196
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 1 Apr 2009 06:52:48 +0000 (06:52 +0000)]
Fix: <rdar://problem/
6740387 >. Sending nil to an object that returns a struct
should only be an error if that value is consumed. This fix was largely
accomplished by moving 'isConsumedExpr' back to ParentMap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68195
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Apr 2009 06:23:52 +0000 (06:23 +0000)]
remove ASTContext::buildObjCInterfaceType, which breaks canonical
types. It is no longer needed now that the code generator
re-lays-out interfaces if they are defines after being laid out
from a forward decl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68194
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 1 Apr 2009 06:13:56 +0000 (06:13 +0000)]
- Changed PathDiagnosticPiece::getLocation() to return a PathDiagnosticLocation
instead of a FullSourceLoc. This resulted in a bunch of small edits in various
clients.
- Updated BugReporter to include an alternate PathDiagnostic generation
algorithm for PathDiagnosticClients desiring more control-flow pieces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68193
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 1 Apr 2009 06:13:08 +0000 (06:13 +0000)]
x86-32 Darwin ABI: Handle direct return of vectors.
- Current return-arguments-32 status is: 8 out of 1000 failures (-7)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68192
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 1 Apr 2009 06:01:08 +0000 (06:01 +0000)]
Update docs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68191
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 1 Apr 2009 05:26:39 +0000 (05:26 +0000)]
Adjust doc format.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68190
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 1 Apr 2009 05:09:09 +0000 (05:09 +0000)]
Pull clang-cc code for generating PTH files based on the input type.
- <rdar://problem/
6741594 > [pth] don't abuse -x to drive pth
generation
- Simpler, and fixes PR3915.
Cleanup test cases for PTH:
- Update to use -emit-pth
- Removed PTH test of carbon.c and cocoa.mm; these didn't actually
verify anything, and since PTH is token based the extra coverage
(over cocoa.m) isn't particularly helpful.
- Split PTH tests in cocoa.m to cocoa-pth.m, solely to increase
available parallelism when running tests.
Ted, could you update the PTH test cases (include-pth.c and
cocoa-pth.m) to have some sort of positive check that the PTH is
getting used? "# of PTH cache hits" or "tokens read from PTH cache"
statistics would work great. :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68189
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 1 Apr 2009 05:05:22 +0000 (05:05 +0000)]
update docs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68188
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 1 Apr 2009 04:37:47 +0000 (04:37 +0000)]
Fix a subtle bug where the cleanup scope entries had a dangling block reference
- <rdar://problem/
6732143 > Crash when generating @synchronize for
zero-cost exception
- Thanks to Anders for helping track down the problem.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68186
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 1 Apr 2009 03:52:47 +0000 (03:52 +0000)]
CFG: For 'if(...) {}' (empty body) construct an empty CFGBlock so that we can
distinguish between the true and false branches for path-sensitive analyses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68185
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 1 Apr 2009 03:28:10 +0000 (03:28 +0000)]
Remove a FIXME, use -emit-pth to drive PTH generation.
- c.f. r68164
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68184
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 1 Apr 2009 03:23:38 +0000 (03:23 +0000)]
Update docs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68183
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 1 Apr 2009 03:17:40 +0000 (03:17 +0000)]
Tweak/cleanup darwin::Link a bit, add several FIXMES, and improve test
case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68182
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 1 Apr 2009 03:17:08 +0000 (03:17 +0000)]
Fix pascal string support; testcase from mailing list message.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68181
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 1 Apr 2009 02:59:02 +0000 (02:59 +0000)]
Follow gcc's example and warn by default on unknown escapes. Inspired
by mailing list message about "\phello" style strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68180
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 1 Apr 2009 02:55:21 +0000 (02:55 +0000)]
Fix test failure on Linux by forcing the triple to OS X.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68179
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 1 Apr 2009 02:48:25 +0000 (02:48 +0000)]
Flip diagnostic from Warning to ExtWarn so that it's an error
with -pedantic-errors. This fixes the C99 part of PR3919.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68178
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Apr 2009 02:36:43 +0000 (02:36 +0000)]
fix the two xfails I added with a previous patch by making ObjC interface
types get completed when their definition is seen if previously laid out by
the code generator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68177
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Apr 2009 02:08:13 +0000 (02:08 +0000)]
move trivial forwarding function inline.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68176
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Apr 2009 02:00:48 +0000 (02:00 +0000)]
tidy some code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68174
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 1 Apr 2009 01:17:39 +0000 (01:17 +0000)]
Fix block comparisons. Radar
6732116 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68171
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 1 Apr 2009 00:58:25 +0000 (00:58 +0000)]
Implement code generation of namespaces and add mangling tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68170
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Apr 2009 00:44:37 +0000 (00:44 +0000)]
add support for the LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX limits.h GNU extensions.
rdar://
6740292
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68169
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 1 Apr 2009 00:42:16 +0000 (00:42 +0000)]
Fix a bug (that I thought I had fixed already) where mangling a prefix could get us into an infinite loop
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68168
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 1 Apr 2009 00:28:59 +0000 (00:28 +0000)]
Parsing, semantic analysis, and template instantiation for typename
specifiers that terminate in a simple-template-id, e.g.,
typename MetaFun::template apply<T1, T2>
Also, implement template instantiation for dependent
nested-name-specifiers that involve unresolved identifiers, e.g.,
typename T::type::type
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68166
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 1 Apr 2009 00:27:44 +0000 (00:27 +0000)]
Tweak darwin::Assemble and add a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68165
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 1 Apr 2009 00:23:28 +0000 (00:23 +0000)]
Add '-emit-pth' option to clang-cc as an alternate API for the high-level driver
to generate PTH files. Soon we will remove from clang-cc the GCC-style '-x
c-header' interface for generating PTH files and push this logic to 'clang'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68164
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 1 Apr 2009 00:15:23 +0000 (00:15 +0000)]
Fix a mangling bug where functions with no arguments weren't getting the 'v' parameter specifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68162
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 31 Mar 2009 23:42:16 +0000 (23:42 +0000)]
Add Target hooks for IRgen of [cf]string literals.
- Notably, set section on cfstring literal string data (for now, this
is done everywhere because it matches what we were already doing
for the CFString data itself)
- <rdar://problem/
6599098 > [irgen] linker requires objc string data
to go into cstring
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68160
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 31 Mar 2009 23:00:32 +0000 (23:00 +0000)]
More code reshuffling. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68157
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Mar 2009 22:37:52 +0000 (22:37 +0000)]
Change UsedArray to be a vector of WeakVH to fix a dangling pointer problem that occurs when
attribute(used) and asm renaming are used together.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68155
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Mar 2009 22:17:44 +0000 (22:17 +0000)]
remove some obsolete comments, use an AssertingVH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68151
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 31 Mar 2009 21:38:17 +0000 (21:38 +0000)]
Driver: Implement basic --help text.
- PR3875.
- <rdar://problem/
6615249 > [driver] ccc should support some form of
--help
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68148
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 31 Mar 2009 21:26:12 +0000 (21:26 +0000)]
Driver: Add OptTable::getOptionKind.
Also, removed default value for getOptionMetaVar.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68146
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 31 Mar 2009 20:53:55 +0000 (20:53 +0000)]
Driver: Forward -Wp, and -Xpreprocessor arguments to clang when using
the preprocessor.
- PR3602.
- As is inherent in the blanket forwarding options, this will only
work if clang-cc happens to accept what the user passed. Users by
and large should use driver options to interact with the
preprocessor, if at all possible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68144
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 31 Mar 2009 20:22:36 +0000 (20:22 +0000)]
Allow two codepaths for PathDiagnostic generation. This patch mainly consists of
refactoring to make this possible (no functionality change).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68141
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 31 Mar 2009 20:22:05 +0000 (20:22 +0000)]
Some cleanup and renaming. No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68140
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 31 Mar 2009 20:12:05 +0000 (20:12 +0000)]
Driver: Add extra parameters for help text to option definitions.
- Currently unused.
And yes, now may be about the time I want a TableGen backend.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68139
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 31 Mar 2009 20:10:05 +0000 (20:10 +0000)]
Add two FIXMEs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68138
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 31 Mar 2009 20:07:16 +0000 (20:07 +0000)]
Improve the dependent nested-name-specifier test a bit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68136
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 31 Mar 2009 19:01:39 +0000 (19:01 +0000)]
x86_32 Darwin ABI: Treat empty unions like empty structures.
- Current return-arguments-32 status: 15/1000 failures
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68132
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 31 Mar 2009 18:58:14 +0000 (18:58 +0000)]
Rename clang.[cpp,h] to clang-cc.[cpp,h] to reflect the name change of the
low-level frontend driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68131
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 31 Mar 2009 18:57:19 +0000 (18:57 +0000)]
Update VS project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68130
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 31 Mar 2009 18:38:02 +0000 (18:38 +0000)]
Implement template instantiation for template names, including both
template template parameters and dependent template names. For
example, the oft-mentioned
typename MetaFun::template apply<T1, T2>::type
can now be instantiated, with the appropriate name lookup for "apply".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68128
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 31 Mar 2009 18:27:22 +0000 (18:27 +0000)]
Patch to fix proptocol reference ir-gen for GNU runtime.
Patch by David Chisnal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68125
91177308 -0d34-0410-b5e6-
96231b3b80d8