Chris Lattner
a84918dcf2
fix some warnings on VC++, patch by John Thompson!
...
llvm-svn: 68391
2009-04-03 17:31:50 +00:00
Chris Lattner
e243851f50
initialize an ivar.
...
llvm-svn: 68387
2009-04-03 15:52:00 +00:00
Steve Naroff
55a719835d
Add a comment/FIXME so Eli can sleep better:-))
...
llvm-svn: 68379
2009-04-03 09:44:50 +00:00
Zhongxing Xu
ec7e7dfe0a
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.
llvm-svn: 68373
2009-04-03 07:33:13 +00:00
Daniel Dunbar
8554a77e8d
Do we have fixit advice for comments yet?
...
llvm-svn: 68372
2009-04-03 06:26:01 +00:00
Anders Carlsson
16b1461c21
Ignore plus operands when looking up the operand number from a named operand. This matches llvm-gcc and fixes PR3908.
...
llvm-svn: 68371
2009-04-03 05:57:08 +00:00
Daniel Dunbar
b536701bc5
Fix comment.
...
llvm-svn: 68370
2009-04-03 05:45:43 +00:00
Fariborz Jahanian
befc9dfbff
Implement -fvisibility.
...
llvm-svn: 68369
2009-04-03 03:28:57 +00:00
Ted Kremenek
5d71204390
Convert region-design document to HTML.
...
llvm-svn: 68366
2009-04-03 01:38:55 +00:00
Daniel Dunbar
6a8803a34f
Driver: Add missed translation for darwin::Preprocess (gcc), -d*
...
wasn't being forwarded.
llvm-svn: 68365
2009-04-03 01:27:06 +00:00
Steve Naroff
3e90e33356
Tweak test (now that http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090330/015001.html is fixed).
...
llvm-svn: 68364
2009-04-03 01:25:18 +00:00
Daniel Dunbar
fd6cfcffa2
Add target hook for setting symbol prefix and section of unicode
...
string literals.
llvm-svn: 68363
2009-04-03 00:57:44 +00:00
Douglas Gregor
0f4cc3f728
Fix a little typo that was killing de-serialization
...
llvm-svn: 68354
2009-04-03 00:25:09 +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
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
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
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
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
Douglas Gregor
578dae57ca
Introduce a "-fixit" mode to clang-cc that applies code-modification hints.
...
llvm-svn: 68268
2009-04-02 01:08:08 +00:00
Mike Stump
40968598c7
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.
llvm-svn: 68267
2009-04-02 01:03:55 +00:00
Ted Kremenek
1e5d9439b8
For plist diagnostics, use the extensive PathDiagnostic generation algorithm.
...
llvm-svn: 68264
2009-04-02 00:44:18 +00:00
Mike Stump
21c81fdce4
We no longer expect an warning as this is now valid.
...
llvm-svn: 68263
2009-04-02 00:04:12 +00:00
Douglas Gregor
170512fa78
Add some more code modification hints
...
llvm-svn: 68261
2009-04-01 23:51:29 +00:00
Daniel Dunbar
7803c9546b
Driver: Allow -ccc-gcc-name to specify the name/path to use when
...
calling gcc in generic configurations.
llvm-svn: 68260
2009-04-01 23:34:41 +00:00
Fariborz Jahanian
e4fd640147
Fix a bug in declaration of property in continuation
...
class which was exposed by implementation of
objc2's nonfragile abi code gen.
llvm-svn: 68259
2009-04-01 23:23:53 +00:00
Douglas Gregor
e3e01a20d0
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.
llvm-svn: 68257
2009-04-01 22:41:11 +00:00
Douglas Gregor
fe3d7d0880
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.
llvm-svn: 68251
2009-04-01 21:51:26 +00:00
Steve Naroff
0f55fd9f33
Update test case and comment.
...
llvm-svn: 68247
2009-04-01 21:27:56 +00:00
Steve Naroff
8d816d6cb5
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).
llvm-svn: 68245
2009-04-01 21:16:31 +00:00
Ted Kremenek
afb066d1f5
BugReporter, extensive path-diagnostics: add an extra control-flow edge to the
...
enclosing statement when jumping to a subexpression.
llvm-svn: 68244
2009-04-01 21:12:06 +00:00
Daniel Dunbar
0a05d93ed6
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.
llvm-svn: 68241
2009-04-01 20:33:11 +00:00
Mike Stump
0c61b7322a
Add -ftrapv support, patch from David Chisnall; well all except the
...
clang option code that is and two bug fixes.
llvm-svn: 68240
2009-04-01 20:28:16 +00:00
Fariborz Jahanian
c2d5618083
Fixes a problem where the compiler is reporting the wrong size to the Gnu
...
runtime on 64-bit architectures.
Patch by David Chisnall
llvm-svn: 68238
2009-04-01 19:49:42 +00:00
Ted Kremenek
95af35e251
Fix comment.
...
llvm-svn: 68236
2009-04-01 19:43:28 +00:00
Daniel Dunbar
35b0c52add
Allow CCC_ADD_ARGS to add empty arguments
...
llvm-svn: 68235
2009-04-01 19:38:07 +00:00
Fariborz Jahanian
78be1651e2
Nonfragile ivar synthesis with property is in a continuation
...
class.
llvm-svn: 68234
2009-04-01 19:37:34 +00:00
Daniel Dunbar
d854c8d8a6
Driver: Add freebsd::Link
...
- Patch by Ed Schouten!
llvm-svn: 68233
2009-04-01 19:36:32 +00:00
Ted Kremenek
3278893a1a
Update CMake file. Patch by Brian Diekelman!
...
llvm-svn: 68232
2009-04-01 19:11:05 +00:00
Daniel Dunbar
dae1d347df
Support CCC_ADD_ARGS in new driver.
...
llvm-svn: 68231
2009-04-01 19:08:46 +00:00
Douglas Gregor
b4b81d8ab1
Revert r68221, -ftrapv support, which causes several regressions in
...
Clang's test suite.
llvm-svn: 68230
2009-04-01 18:59:55 +00:00
Ted Kremenek
ed47d79cc2
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"
llvm-svn: 68228
2009-04-01 18:48:52 +00:00
Daniel Dunbar
7fdda1d695
Split PTH tests from carbon.c into separate test.
...
llvm-svn: 68223
2009-04-01 18:25:32 +00:00
Mike Stump
fbc8c132ba
Add -ftrapv support, patch from David Chisnall; well all except the
...
clang option code that is.
llvm-svn: 68221
2009-04-01 18:19:33 +00:00
Daniel Dunbar
9ff631039c
Forgot to remove trailing &&
...
llvm-svn: 68220
2009-04-01 18:11:41 +00:00
Ted Kremenek
9ce13241ff
BugReporter: for extensive PathDiagnostic generation, add control-flow from the
...
start of the function/method.
llvm-svn: 68217
2009-04-01 17:52:26 +00:00
Ted Kremenek
45a75f718c
BugReporter: For the "extensive" PathDiagnostic generation algorithm, elide most
...
intra-compound statement jumps unless they are between terminators (i.e.,
branches).
llvm-svn: 68216
2009-04-01 17:18:21 +00:00
Daniel Dunbar
f46945b274
Ted & I crossed paths here, these tests are in cocoa-pth.m now.
...
llvm-svn: 68215
2009-04-01 16:59:39 +00:00
Fariborz Jahanian
95c802cc03
Removed the test case, as Chris did have a test case in the patch.
...
llvm-svn: 68214
2009-04-01 16:53:37 +00:00
Fariborz Jahanian
df3a9f92b3
Test case for Chris's patch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=68177
llvm-svn: 68213
2009-04-01 16:51:23 +00:00
Douglas Gregor
7c15b9c9a0
Add testcase for -Wmissing-prototypes
...
llvm-svn: 68212
2009-04-01 16:38:48 +00:00
Douglas Gregor
60f3c95926
Add some examples of Fix-it hints to our documentation
...
llvm-svn: 68210
2009-04-01 16:24:40 +00:00
Steve Naroff
29cae66bde
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...
llvm-svn: 68208
2009-04-01 15:50:34 +00:00
Douglas Gregor
2e0757f319
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.
llvm-svn: 68207
2009-04-01 15:47:24 +00:00
Daniel Dunbar
f524eff37d
Add cocoa-pth.c test case, this got lost in shuffling PTH test cases.
...
llvm-svn: 68205
2009-04-01 15:36:37 +00:00
Ted Kremenek
455de13de1
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.
llvm-svn: 68204
2009-04-01 15:28:20 +00:00
Steve Naroff
e14b368fa9
More "prep" work for handling UTF16 CFString.
...
Patch by Jean-Daniel Dupas. Thanks!
llvm-svn: 68203
2009-04-01 13:55:36 +00:00
Steve Naroff
c94adda157
ProcessUCNEscape(): Incorportate some feedback from Chris.
...
llvm-svn: 68198
2009-04-01 11:09:15 +00:00
Daniel Dunbar
e80bd1897c
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
llvm-svn: 68197
2009-04-01 07:45:00 +00:00
Daniel Dunbar
58e2971bb0
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.
llvm-svn: 68196
2009-04-01 07:08:38 +00:00
Ted Kremenek
8b0dba358a
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.
llvm-svn: 68195
2009-04-01 06:52:48 +00:00
Chris Lattner
3088a31e96
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.
llvm-svn: 68194
2009-04-01 06:23:52 +00:00
Ted Kremenek
0bb0909233
- 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.
llvm-svn: 68193
2009-04-01 06:13:56 +00:00
Daniel Dunbar
cd76e673eb
x86-32 Darwin ABI: Handle direct return of vectors.
...
- Current return-arguments-32 status is: 8 out of 1000 failures (-7)
llvm-svn: 68192
2009-04-01 06:13:08 +00:00
Zhongxing Xu
034247130e
Update docs.
...
llvm-svn: 68191
2009-04-01 06:01:08 +00:00
Zhongxing Xu
dcb7a35294
Adjust doc format.
...
llvm-svn: 68190
2009-04-01 05:26:39 +00:00
Daniel Dunbar
386ef885bb
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. :)
llvm-svn: 68189
2009-04-01 05:09:09 +00:00
Zhongxing Xu
1b1d3f6b0c
update docs.
...
llvm-svn: 68188
2009-04-01 05:05:22 +00:00
Daniel Dunbar
f77e292a0f
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.
llvm-svn: 68186
2009-04-01 04:37:47 +00:00
Ted Kremenek
1b37951f36
CFG: For 'if(...) {}' (empty body) construct an empty CFGBlock so that we can
...
distinguish between the true and false branches for path-sensitive analyses.
llvm-svn: 68185
2009-04-01 03:52:47 +00:00
Daniel Dunbar
2ec6e8e2ba
Remove a FIXME, use -emit-pth to drive PTH generation.
...
- c.f. r68164
llvm-svn: 68184
2009-04-01 03:28:10 +00:00
Zhongxing Xu
c473a44507
Update docs.
...
llvm-svn: 68183
2009-04-01 03:23:38 +00:00
Daniel Dunbar
ae8bca038d
Tweak/cleanup darwin::Link a bit, add several FIXMES, and improve test
...
case.
llvm-svn: 68182
2009-04-01 03:17:40 +00:00
Eli Friedman
1c3fb22cad
Fix pascal string support; testcase from mailing list message.
...
llvm-svn: 68181
2009-04-01 03:17:08 +00:00
Eli Friedman
706e0a14e2
Follow gcc's example and warn by default on unknown escapes. Inspired
...
by mailing list message about "\phello" style strings.
llvm-svn: 68180
2009-04-01 02:59:02 +00:00
Eli Friedman
84ae509ac3
Fix test failure on Linux by forcing the triple to OS X.
...
llvm-svn: 68179
2009-04-01 02:55:21 +00:00
Eli Friedman
a331a63397
Flip diagnostic from Warning to ExtWarn so that it's an error
...
with -pedantic-errors. This fixes the C99 part of PR3919.
llvm-svn: 68178
2009-04-01 02:48:25 +00:00
Chris Lattner
d18136a644
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.
llvm-svn: 68177
2009-04-01 02:36:43 +00:00
Chris Lattner
6483908957
move trivial forwarding function inline.
...
llvm-svn: 68176
2009-04-01 02:08:13 +00:00
Chris Lattner
87bc387f8f
tidy some code.
...
llvm-svn: 68174
2009-04-01 02:00:48 +00:00
Mike Stump
cafa0a9746
Fix block comparisons. Radar 6732116.
...
llvm-svn: 68171
2009-04-01 01:17:39 +00:00
Anders Carlsson
237f349073
Implement code generation of namespaces and add mangling tests.
...
llvm-svn: 68170
2009-04-01 00:58:25 +00:00
Chris Lattner
f16f90b4fd
add support for the LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX limits.h GNU extensions.
...
rdar://6740292
llvm-svn: 68169
2009-04-01 00:44:37 +00:00
Anders Carlsson
12edad2c50
Fix a bug (that I thought I had fixed already) where mangling a prefix could get us into an infinite loop
...
llvm-svn: 68168
2009-04-01 00:42:16 +00:00
Douglas Gregor
dce2b62b70
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
llvm-svn: 68166
2009-04-01 00:28:59 +00:00
Daniel Dunbar
5c9c118600
Tweak darwin::Assemble and add a FIXME.
...
llvm-svn: 68165
2009-04-01 00:27:44 +00:00
Ted Kremenek
0df7051783
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'.
llvm-svn: 68164
2009-04-01 00:23:28 +00:00
Anders Carlsson
7a6f8b9281
Fix a mangling bug where functions with no arguments weren't getting the 'v' parameter specifier.
...
llvm-svn: 68162
2009-04-01 00:15:23 +00:00
Daniel Dunbar
08b216abf1
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
llvm-svn: 68160
2009-03-31 23:42:16 +00:00
Ted Kremenek
7062c50772
More code reshuffling. No functionality change.
...
llvm-svn: 68157
2009-03-31 23:00:32 +00:00
Chris Lattner
f41e87f4cd
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.
llvm-svn: 68155
2009-03-31 22:37:52 +00:00
Chris Lattner
2739d2bbe6
remove some obsolete comments, use an AssertingVH.
...
llvm-svn: 68151
2009-03-31 22:17:44 +00:00
Daniel Dunbar
7c92528530
Driver: Implement basic --help text.
...
- PR3875.
- <rdar://problem/6615249> [driver] ccc should support some form of
--help
llvm-svn: 68148
2009-03-31 21:38:17 +00:00
Daniel Dunbar
77684ead4b
Driver: Add OptTable::getOptionKind.
...
Also, removed default value for getOptionMetaVar.
llvm-svn: 68146
2009-03-31 21:26:12 +00:00
Daniel Dunbar
e521a8994c
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.
llvm-svn: 68144
2009-03-31 20:53:55 +00:00
Ted Kremenek
4e81c3ccac
Allow two codepaths for PathDiagnostic generation. This patch mainly consists of
...
refactoring to make this possible (no functionality change).
llvm-svn: 68141
2009-03-31 20:22:36 +00:00
Douglas Gregor
b046ffb002
Some cleanup and renaming. No functionality change
...
llvm-svn: 68140
2009-03-31 20:22:05 +00:00
Daniel Dunbar
a207254f94
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.
llvm-svn: 68139
2009-03-31 20:12:05 +00:00
Daniel Dunbar
4cb6715434
Add two FIXMEs
...
llvm-svn: 68138
2009-03-31 20:10:05 +00:00
Douglas Gregor
7ef46d9ae2
Improve the dependent nested-name-specifier test a bit
...
llvm-svn: 68136
2009-03-31 20:07:16 +00:00
Daniel Dunbar
35579146aa
x86_32 Darwin ABI: Treat empty unions like empty structures.
...
- Current return-arguments-32 status: 15/1000 failures
llvm-svn: 68132
2009-03-31 19:01:39 +00:00
Ted Kremenek
7b4df3c3e6
Rename clang.[cpp,h] to clang-cc.[cpp,h] to reflect the name change of the
...
low-level frontend driver.
llvm-svn: 68131
2009-03-31 18:58:14 +00:00
Ted Kremenek
97823d32ea
Update VS project.
...
llvm-svn: 68130
2009-03-31 18:57:19 +00:00
Douglas Gregor
aa59489b18
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".
llvm-svn: 68128
2009-03-31 18:38:02 +00:00
Fariborz Jahanian
89d239796a
Patch to fix proptocol reference ir-gen for GNU runtime.
...
Patch by David Chisnal.
llvm-svn: 68125
2009-03-31 18:27:22 +00:00
Fariborz Jahanian
63a224ad59
ir-gen support for nonfragile abi's synthesized ivars.
...
llvm-svn: 68122
2009-03-31 18:11:23 +00:00
Daniel Dunbar
8eb473c477
Driver: Call 'as' directly on FreeBSD.
...
- Patch by Ed Schouten!
llvm-svn: 68121
2009-03-31 17:45:15 +00:00
Daniel Dunbar
d640be24fd
(LLVM up) Update to use llvm::sys::getHostTriple().
...
- Always pass -triple to clang-cc (-arch will be removed).
- clang-cc doesn't play guess work with the target triple anymore.
llvm-svn: 68119
2009-03-31 17:35:15 +00:00
Steve Naroff
1bf3b718cd
Add -Wdeprecated-declarations to driver and add a test case.
...
llvm-svn: 68117
2009-03-31 17:28:26 +00:00
Anders Carlsson
452e1c8a6a
We fully support namespace aliases now.
...
llvm-svn: 68116
2009-03-31 17:17:14 +00:00
Fariborz Jahanian
3254a6f94c
More toward nonfragile abi's synthesized ivars.
...
llvm-svn: 68115
2009-03-31 17:00:52 +00:00
Steve Naroff
66afeb5968
Some "prep" work for handling ObjC @-string constants that contain UTF-8. No functionality change.
...
Changed GenerateConstantString() to take an ObjCStringLiteral (instead of a std::string). While this isn't strictly necessary, it seems cleaner and allows us to cache to "containsNonAscii" if necessary (to avoid checking in both Sema and CodeGen).
llvm-svn: 68114
2009-03-31 16:53:37 +00:00
Douglas Gregor
f1b876d5de
Implement -Wmissing-prototypes. Fixes PR3911.
...
llvm-svn: 68110
2009-03-31 16:35:03 +00:00
Steve Naroff
ea9a107ada
Add support for -Wdeprecated-declarations.
...
This fixes <rdar://problem/6712496> Unable to disable deprecated warning.
llvm-svn: 68108
2009-03-31 15:00:11 +00:00
Steve Naroff
f2a880ca22
Incorporate feedback from Eli.
...
llvm-svn: 68107
2009-03-31 10:29:45 +00:00
Chris Lattner
8b14b98bab
Fix a problem in ASTContext::addRecordToClass handling forward declarations.
...
In a case like:
@class foo;
foo *P;
addRecordToClass was making an empty shadow struct for the foo interface and
completing it. Later when an:
@interface foo
...
@endif
foo *Q;
was seen, ASTContext::addRecordToClass would think that foo was already laid
out and not lay out the definition. This fixes it to create a forward declared
struct the first time around, then complete it when the definition is seen.
Note that this causes two tests to regress, because something is trying to get
the size of the forward declared structs returned by this. Previously, this
would end up getting a size of zero but now it properly dies. I'm not sure
what the right solution is for this, so I xfailed the tests.
Fariborz, please take a look at this. The testcase in rdar://6676794 now gets
farther, but dies later because the objc ivar is not assigned a field number.
As an aside, I really don't like the fact that the objc front-end is creating
shadow C structs for ObjC types. This seems like an implementation detail of
the code generator that could be fixed by better factoring of the extant code.
llvm-svn: 68106
2009-03-31 09:24:30 +00:00
Chris Lattner
05aa49128c
remove a dead prototype
...
llvm-svn: 68105
2009-03-31 09:07:15 +00:00
Chris Lattner
733dc19be6
remove the warning. We don't control what users do, and this code
...
is run for perfectly reasonable things like NSString* because type
layout is recursive.
llvm-svn: 68104
2009-03-31 09:04:50 +00:00
Chris Lattner
6d35cc945f
disable copying of Type objects.
...
llvm-svn: 68103
2009-03-31 08:58:42 +00:00
Chris Lattner
3e2f36e905
do not *copy* objc interface types, just use their reference.
...
llvm-svn: 68102
2009-03-31 08:55:07 +00:00
Chris Lattner
5b36ddb1ad
fill in temporary smallvectors instead of vectors for performance.
...
Fix BuildAggrIvarLayout to not access vectors out of range.
llvm-svn: 68101
2009-03-31 08:48:01 +00:00
Chris Lattner
d8a47c42cd
simplify some casting
...
llvm-svn: 68098
2009-03-31 08:36:08 +00:00
Chris Lattner
06ae0e2c3b
small cleanups.
...
llvm-svn: 68095
2009-03-31 08:33:16 +00:00
Chris Lattner
f71b69f7f3
add a const version of the lookupFieldDeclForIvar method.
...
llvm-svn: 68094
2009-03-31 08:31:13 +00:00
Chris Lattner
fe4847e331
reduce nesting.
...
llvm-svn: 68091
2009-03-31 08:18:48 +00:00
Chris Lattner
5d68896c7b
Codegen sometimes crashes on comparisons that aren't legal, just
...
disable this feature for now, to err on the side of rejecting instead
of sometimes crashing. rdar://6326239
llvm-svn: 68088
2009-03-31 07:46:52 +00:00
Anders Carlsson
dafd621b22
Check in test for namespace aliases+using directives.
...
llvm-svn: 68086
2009-03-31 05:47:19 +00:00
Anders Carlsson
10b9f81eaf
Document NamespaceAliasDecl.
...
llvm-svn: 68085
2009-03-31 04:51:13 +00:00
Ted Kremenek
f0ec333fc1
Update test case.
...
llvm-svn: 68084
2009-03-31 03:34:38 +00:00
Douglas Gregor
b67535d1b6
Parsing and AST representation for dependent template names that occur
...
within nested-name-specifiers, e.g., for the "apply" in
typename MetaFun::template apply<T1, T2>::type
At present, we can't instantiate these nested-name-specifiers, so our
testing is sketchy.
llvm-svn: 68081
2009-03-31 00:43:58 +00:00
Fariborz Jahanian
b35b4a9b42
fe support for objc2's nonfragile-abi synthesized ivars.
...
llvm-svn: 68077
2009-03-31 00:06:29 +00:00
Steve Naroff
7b753d21b5
Implement UCN support for C string literals (C99 6.4.3) and add some very basic tests. Chris Goller has graciously offered to write some test to help validate UCN support.
...
From a front-end perspective, I believe this code should work for ObjC @-strings. At the moment, I believe we need to tweak the code generation for @-strings (which doesn't appear to handle them). Will be investigating.
llvm-svn: 68076
2009-03-30 23:46:03 +00:00
Eli Friedman
29f80c343b
Slight generalization for Evaluate with const variables.
...
llvm-svn: 68075
2009-03-30 23:39:01 +00:00
Douglas Gregor
dc572a3266
Improve the representation of template names in the AST. This
...
representation handles the various ways in which one can name a
template, including unqualified references ("vector"), qualified
references ("std::vector"), and dependent template names
("MetaFun::template apply").
One immediate effect of this change is that the representation of
nested-name-specifiers in type names for class template
specializations (e.g., std::vector<int>) is more accurate. Rather than
representing std::vector<int> as
std::(vector<int>)
we represent it as
(std::vector)<int>
which more closely follows the C++ grammar.
Additionally, templates are no longer represented as declarations
(DeclPtrTy) in Parse-Sema interactions. Instead, I've introduced a new
OpaquePtr type (TemplateTy) that holds the representation of a
TemplateName. This will simplify the handling of dependent
template-names, once we get there.
llvm-svn: 68074
2009-03-30 22:58:21 +00:00
Ted Kremenek
89cc8ea794
Add partial CFG support for Objective-C exception-handling blocks. We basically
...
assume that @catch blocks are never executed.
llvm-svn: 68072
2009-03-30 22:29:21 +00:00
Ted Kremenek
7857bd2743
Re-apply 68028. The code had drifted enough that the tests would fail without
...
it. Will discuss offline whether symbolic regions should by typed or typeless.
llvm-svn: 68070
2009-03-30 22:20:54 +00:00
Daniel Dunbar
cbe5b2f800
Comment fix.
...
llvm-svn: 68069
2009-03-30 22:11:38 +00:00
Ted Kremenek
5715393da2
Revert 68028.
...
llvm-svn: 68068
2009-03-30 21:56:17 +00:00
Fariborz Jahanian
6683b8a272
Added new info to property impl. AST node to support
...
objc2's ivar synthesis.
llvm-svn: 68064
2009-03-30 21:33:50 +00:00
Ted Kremenek
3cd88e5d99
Remove dead code.
...
llvm-svn: 68063
2009-03-30 21:27:41 +00:00
Eli Friedman
1a4029c5df
Implement -Wno-pointer-sign.
...
llvm-svn: 68062
2009-03-30 21:19:48 +00:00
Daniel Dunbar
e24297c6b5
Driver: Sketch FreeBSD tool chain.
...
- Patch by Ed Schouten!
llvm-svn: 68061
2009-03-30 21:06:03 +00:00
Fariborz Jahanian
ed308a94da
Code gen does not yet supports __asm__ on a variable
...
declaration. Reject it.
llvm-svn: 68058
2009-03-30 20:32:06 +00:00
Ted Kremenek
ac508988a5
Simplify more code by using SVal::getAsSymbol().
...
llvm-svn: 68052
2009-03-30 19:53:37 +00:00
Ted Kremenek
248fd2bc24
Simplify more code by using SVal::getAsSymbol() instead of
...
loc::SymbolVal/nonloc::SymbolVal probing.
llvm-svn: 68049
2009-03-30 18:45:36 +00:00
Ted Kremenek
a53eb7fa80
Convert use of loc::SymbolVal and nonloc::SymbolVal to V.getAsSymbol(). This
...
also makes this code more correct as it transparently handles SVals that wrapped
TypedViewRegions(SymbolicRegions).
llvm-svn: 68048
2009-03-30 18:39:15 +00:00
Ted Kremenek
cf2d8f0404
Add another uninitialized values test case illustrating that the CFG correctly
...
handles declarations with multiple variables.
llvm-svn: 68046
2009-03-30 18:29:27 +00:00
Douglas Gregor
b9a1d3fd44
Remove a trivial FIXME
...
llvm-svn: 68045
2009-03-30 18:22:51 +00:00
Daniel Dunbar
13357aef14
Driver: Unbreak ArgList::hasFlag.
...
- <rdar://problem/6726511> [driver] clang does not have -msoft-float
hooked up.
llvm-svn: 68044
2009-03-30 18:13:26 +00:00
Fariborz Jahanian
3b636c15e0
Use CodeGenModule API for ObjC runtime function references.
...
Patch by David Chisnall.
llvm-svn: 68043
2009-03-30 18:02:14 +00:00
Daniel Dunbar
759b1c9b80
Fix -MD with no -MT when -o is specified (and fix test case).
...
llvm-svn: 68042
2009-03-30 17:59:58 +00:00
Ted Kremenek
4967c8979e
Add version of GRExprEngine::AddCheck that registered a GRSimpleAPICheck that
...
will be called for every expression in a basic block.
llvm-svn: 68041
2009-03-30 17:53:05 +00:00
Daniel Dunbar
1cd3f8c54f
Some very rough Driver documentation.
...
llvm-svn: 68030
2009-03-30 06:50:01 +00:00
Daniel Dunbar
a88692df30
Missed test case update (part of previous commit)
...
llvm-svn: 68029
2009-03-30 06:49:40 +00:00
Zhongxing Xu
5415b207e3
Make SymbolicRegion untyped.
...
Layer the type information with a TypedViewRegion on top of the SymbolicRegion.
llvm-svn: 68028
2009-03-30 06:48:56 +00:00
Daniel Dunbar
d67a32252c
Driver: Support -M and -MM.
...
- Not particularly elegant, but my hand is forced by gcc.
Also, tweak -ccc-print-bindings output.
llvm-svn: 68027
2009-03-30 06:36:42 +00:00
Zhongxing Xu
a865b79f87
Implement a FIXME.
...
llvm-svn: 68024
2009-03-30 05:55:46 +00:00
Daniel Dunbar
52e96cc932
Improve dependency file support.
...
- Rip out various bits of logic from clang-cc's dependency file gen,
force driver to provide instead.
- -MD output now goes to proper location
<rdar://problem/6723948> clang -MD puts dep file in /tmp with wrong name
- -M and -MM still don't work correctly.
llvm-svn: 68022
2009-03-30 00:34:04 +00:00
Sebastian Redl
f69a94aace
Hopefully fix the rval regressions. Thanks to Chris for pointing out that valgrind complains.
...
llvm-svn: 68021
2009-03-29 22:46:24 +00:00
Daniel Dunbar
53b406f40a
Driver: Track which original arguments an arg is derived from, so that
...
we can properly claim arguments, even if they have been translated by
the tool chain.
llvm-svn: 68020
2009-03-29 22:29:05 +00:00
Daniel Dunbar
f64f5307dc
Driver: Add test case for darwin::Preprocess and darwin::Compile
...
tools, and enable them.
llvm-svn: 68019
2009-03-29 22:27:40 +00:00
Daniel Dunbar
58399aecc1
Driver: Make sure to claim -### before emitting "unused argument"
...
warnings.
llvm-svn: 68018
2009-03-29 22:24:54 +00:00
Daniel Dunbar
e2ad1c2159
Fix typo in diagnostic.
...
llvm-svn: 68017
2009-03-29 22:23:49 +00:00
Eli Friedman
32ca82a450
Fix the default for intptr_t on *BSD x86-32 and Windows. Slight cleanup
...
by moving the general case to the generic x86-32 target.
llvm-svn: 68015
2009-03-29 20:31:09 +00:00
Daniel Dunbar
afec1f58e9
Driver: Finish porting Darwin::Preprocess and Compile port (still
...
unused, and lacking a test case).
- ccc is now on death row, pending some more testing and bug fixes.
llvm-svn: 68012
2009-03-29 18:40:18 +00:00
Chris Lattner
be36eb0570
minor simplification
...
llvm-svn: 68011
2009-03-29 17:29:28 +00:00
Chris Lattner
32dc41c445
hoist some code for handling objc foreach construct out of Declaration processing
...
into ParseForStatement. Merge two tests into one.
llvm-svn: 68010
2009-03-29 17:27:48 +00:00
Chris Lattner
efb0f111f1
hoist checks for ; and in out of ParseInitDeclaratorListAfterFirstDeclarator
...
into ParseSimpleDeclaration, and improve a diagnostic.
llvm-svn: 68009
2009-03-29 17:18:04 +00:00
Daniel Dunbar
e6adeeece3
Driver: Start porting Darwin::Preprocess and Compile implementations
...
(currently unused).
llvm-svn: 68003
2009-03-29 17:08:39 +00:00
Chris Lattner
5bbb3c8ad9
Push DeclGroup much farther throughout the compiler. Now the various
...
productions (except the already broken ObjC cases like @class X,Y;) in
the parser that can produce more than one Decl return a DeclGroup instead
of a Decl, etc.
This allows elimination of the Decl::NextDeclarator field, and exposes
various clients that should look at all decls in a group, but which were
only looking at one (such as the dumper, printer, etc). These have been
fixed.
Still TODO:
1) there are some FIXME's in the code about potentially using
DeclGroup for better location info.
2) ParseObjCAtDirectives should return a DeclGroup due to @class etc.
3) I'm not sure what is going on with StmtIterator.cpp, or if it can
be radically simplified now.
4) I put a truly horrible hack in ParseTemplate.cpp.
I plan to bring up #3/4 on the mailing list, but don't plan to tackle
#1/2 in the short term.
llvm-svn: 68002
2009-03-29 16:50:03 +00:00
Chris Lattner
6c84a5a394
DeclRefExpr refers to one decl, not all the declarators in a declaration.
...
Ted, please check this, this change causes no regression tests to fail.
llvm-svn: 68001
2009-03-29 16:35:09 +00:00
Chris Lattner
3d954d5d0e
simplify
...
llvm-svn: 68000
2009-03-29 16:04:50 +00:00
Sebastian Redl
4c0cd856b1
Reintroduce r67870 (rval ref overloading), since I can't reproduce any test failures on i386 or x86_64. If this fails for someone, please contact me.
...
llvm-svn: 67999
2009-03-29 15:27:50 +00:00
Chris Lattner
41b1601bdd
Implement PointerLikeTypeTraits for DeclGroupRef.
...
Make OpaquePtr work with things that are pointer-like but not
necessarily pointers.
llvm-svn: 67998
2009-03-29 14:23:52 +00:00
Chris Lattner
4de55aa4f2
reduce indentation with an early exit.
...
llvm-svn: 67997
2009-03-29 14:02:43 +00:00
Chris Lattner
87576f3639
remove unused #include
...
llvm-svn: 67994
2009-03-29 07:05:59 +00:00
Chris Lattner
63595ddcb5
switch TemplateOrInstantiation to be a PointerUnion, which
...
simplifies some code.
llvm-svn: 67993
2009-03-29 07:03:59 +00:00
Chris Lattner
51ce02d264
change another PointerIntPair into a PointerUnion.
...
llvm-svn: 67991
2009-03-29 06:43:22 +00:00
Chris Lattner
b81eb052f2
switch DeclBase::DeclCtx to the new happy and type-safe
...
llvm::PointerUnion class.
llvm-svn: 67988
2009-03-29 06:06:59 +00:00
Chris Lattner
57ce399326
Make the ActionResult optimization work for non-void*'s and switch DeclPtrTy to use it.
...
llvm-svn: 67983
2009-03-29 05:08:48 +00:00
Chris Lattner
cd8bb18624
genericize the ActionResult optimization for holding the "ininvalid" bit
...
in the low bit position a little bit (haha).
llvm-svn: 67982
2009-03-29 05:04:26 +00:00
Chris Lattner
85e2e141db
various cleanups
...
llvm-svn: 67981
2009-03-29 05:01:10 +00:00
Chris Lattner
20d79aa1c2
adjust to llvm mainline changes.
...
llvm-svn: 67980
2009-03-29 04:32:54 +00:00
Chris Lattner
114597d69b
tighten this up, the decl *must* be a declcontext, no need for the dynamic check.
...
llvm-svn: 67978
2009-03-29 04:30:19 +00:00
Chris Lattner
59f1a41f2e
add fixme
...
llvm-svn: 67977
2009-03-29 01:03:29 +00:00
Ted Kremenek
42361b3eb5
Update checker build.
...
llvm-svn: 67976
2009-03-29 00:43:39 +00:00
Chris Lattner
ed6b4b0598
add getNumLowBitsAvailable for OpaquePtr and QualType.
...
llvm-svn: 67975
2009-03-29 00:41:20 +00:00
Chris Lattner
22d059dbde
follow llvm mainline, where PointerLikeTypeInfo got renamed
...
to PointerLikeTypeTraits.
llvm-svn: 67974
2009-03-29 00:39:47 +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
Eli Friedman
bbcf49e410
Initial implementation of ARM ABI. Mostly untested. Note that I'm not
...
really intending to take ownership of this; I wrote this mostly because
I was curious about how the ARM ABI works. It should be a decent start,
though.
llvm-svn: 67969
2009-03-29 00:15:25 +00:00
Chris Lattner
a59a3e2d10
QualType can go in SmallPtrSet now, simplify code that used to have
...
to work around this.
llvm-svn: 67968
2009-03-29 00:04:01 +00:00
Chris Lattner
5ab14f5175
implement the PointerLikeTypeInfo trait for QualType, allowing
...
it to be stuck into a SmallPtrSet.
llvm-svn: 67967
2009-03-29 00:03:08 +00:00
Anders Carlsson
bb1e4724f1
More improvements to namespace aliases. We now support everything except aliases in using directives.
...
llvm-svn: 67966
2009-03-28 23:53:49 +00:00
Anders Carlsson
c8820e5f9f
Handle the case where the namespace decl is an alias.
...
llvm-svn: 67965
2009-03-28 23:50:18 +00:00
Anders Carlsson
3694935cd2
Fix lookup bug
...
llvm-svn: 67964
2009-03-28 23:49:35 +00:00
Anders Carlsson
f03bb51a00
Let getIdentifierNamespaceForKind know about aliases and have it treat them just like namespace decls.
...
llvm-svn: 67963
2009-03-28 23:02:53 +00:00
Anders Carlsson
ff25fdf2fb
Create AST nodes for namespace aliases.
...
llvm-svn: 67962
2009-03-28 22:58:02 +00:00
Anders Carlsson
47952aec09
Parse the location of the 'namespace' token to ActOnNamespaceAliasDef. No functionality change.
...
llvm-svn: 67961
2009-03-28 22:53:22 +00:00
Ted Kremenek
035cf930d5
Fix regression in pointer comparison with NULL (e.g., 0 != ptr). This fixes
...
<rdar://problem/6732151>.
llvm-svn: 67954
2009-03-28 19:59:33 +00:00
Chris Lattner
83f095cc7e
Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a
...
pointer. Its purpose in life is to be a glorified void*, but which does not
implicitly convert to void* or other OpaquePtr's with a different UID.
Introduce Action::DeclPtrTy which is a typedef for OpaquePtr<0>. Change the
entire parser/sema interface to use DeclPtrTy instead of DeclTy*. This
makes the C++ compiler enforce that these aren't convertible to other opaque
types.
We should also convert ExprTy, StmtTy, TypeTy, AttrTy, BaseTy, etc,
but I don't plan to do that in the short term.
The one outstanding known problem with this patch is that we lose the
bitmangling optimization where ActionResult<DeclPtrTy> doesn't know how to
bitmangle the success bit into the low bit of DeclPtrTy. I will rectify
this with a subsequent patch.
llvm-svn: 67952
2009-03-28 19:18:32 +00:00
Chris Lattner
b7de9b7704
sort alphabetically
...
llvm-svn: 67951
2009-03-28 19:10:22 +00:00
Ted Kremenek
b505811250
Adjust control-flow endpoints for '&&' and '||'.
...
llvm-svn: 67948
2009-03-28 17:33:57 +00:00
Ted Kremenek
ae1c4a40ef
Add comparison operators for PathDiagosticLocation.
...
llvm-svn: 67947
2009-03-28 17:33:08 +00:00
Ted Kremenek
04ab6c8b17
Add comparison operators for SourceRange.
...
llvm-svn: 67946
2009-03-28 17:32:39 +00:00
Cedric Venet
351c71a85f
CMake: remove TranslationUnit.cpp from build (file has been removed).
...
llvm-svn: 67944
2009-03-28 12:41:49 +00:00
Chris Lattner
8372efd39a
move file to proper place.
...
llvm-svn: 67933
2009-03-28 08:04:44 +00:00
Anders Carlsson
b81608499e
As Eli pointed out, it is possible that a namespace lookup is ambiguous!
...
llvm-svn: 67932
2009-03-28 07:51:31 +00:00
Chris Lattner
a3d4aeb113
add accessors.
...
llvm-svn: 67929
2009-03-28 07:00:38 +00:00
Chris Lattner
6b6185b18f
some random cleanups
...
llvm-svn: 67928
2009-03-28 06:53:40 +00:00
Chris Lattner
e173d44137
eliminate unneeded iterator wrappers.
...
llvm-svn: 67927
2009-03-28 06:47:16 +00:00
Chris Lattner
330958e9b0
change NamespaceDecl to hold its 'NextNamespace' pointer itself
...
instead of in NextDeclarator. This temporarily increases memory
usage, but simplifies and decouples things.
llvm-svn: 67926
2009-03-28 06:44:59 +00:00
Anders Carlsson
ac2c96528f
Check that the alias points to a valid namespace.
...
llvm-svn: 67925
2009-03-28 06:42:02 +00:00
Ted Kremenek
ae1aa43617
Properly escape special characters in <string>'s in plist file.
...
llvm-svn: 67924
2009-03-28 06:40:54 +00:00
Chris Lattner
529efc74ad
rename some methods.
...
llvm-svn: 67923
2009-03-28 06:33:19 +00:00