Fariborz Jahanian
49c81799b0
Patch to build AST for ctor's initializer list according to
...
semantics of order of construction [class.init].
llvm-svn: 75649
2009-07-14 18:24:21 +00:00
Chris Lattner
ff1ee0d7c9
[llvm up] adjust to match mainline.
...
llvm-svn: 75647
2009-07-14 18:18:16 +00:00
Anders Carlsson
466fd0a16d
Rename RecordLayout.h to ASTRecordLayout.h
...
llvm-svn: 75641
2009-07-14 17:29:11 +00:00
Daniel Dunbar
88719a1dd6
Revert r75614 which depend on r75610 (for LLVM), which was reverted.
...
--- Reverse-merging r75614 into '.':
U lib/CodeGen/CGDebugInfo.cpp
llvm-svn: 75639
2009-07-14 16:40:28 +00:00
Steve Naroff
5ec6ff7678
Add a "TypeSpecStartLoc" to FieldDecl. Patch contributed by Enea Zaffanella.
...
Note: One day, it might be useful to consider adding this info to DeclGroup (as the comments in FunctionDecl/VarDecl suggest). For now, I think this works fine. I considered moving this to ValueDecl (a common ancestor of FunctionDecl/VarDecl/FieldDecl), however this would add overhead to EnumConstantDecl (which would burn memory and isn't necessary).
llvm-svn: 75635
2009-07-14 14:58:18 +00:00
Alisdair Meredith
ed28f6e433
Fix the build
...
llvm-svn: 75627
2009-07-14 08:10:06 +00:00
Alisdair Meredith
a9ad47d94c
Basic support for C++0x unicode types. Support for literals will follow in an incremental patch
...
llvm-svn: 75622
2009-07-14 06:30:34 +00:00
Chris Lattner
74d3c61532
use new name for method.
...
llvm-svn: 75614
2009-07-14 06:16:43 +00:00
Argyrios Kyrtzidis
b0c86d4fe8
In Stmt::printPretty(), pass the SourceManager to dump().
...
llvm-svn: 75606
2009-07-14 03:20:38 +00:00
Argyrios Kyrtzidis
1506d9bc25
Introduce redecl_iterator, used for iterating over the redeclarations of a FunctionDecl or VarDecl.
...
It iterates over all the redeclarations, regardless of the starting point. For example:
1) int f();
2) int f();
3) int f();
if you have the (2) FunctionDecl and call redecls_begin/redecls_end to iterate, you'll get this sequence:
(2)
(1)
(3)
The motivation to introduce this was that, previously, if (3) was a function definition,
and you called getBody() at (2), it would not return it, since getBody() iterated over the previous declarations only,
so it would only check (2) and (1).
llvm-svn: 75604
2009-07-14 03:20:21 +00:00
Argyrios Kyrtzidis
0736c5ca3b
Introduce FunctionDecl::getLatestDeclaration() and VarDecl::getLatestDeclaration().
...
For multiple redeclarations they return the last one.
Also, add some non const versions of methods.
llvm-svn: 75603
2009-07-14 03:20:08 +00:00
Argyrios Kyrtzidis
ef17c07bf6
Introduce FunctionDecl::getFirstDeclaration() and VarDecl::getFirstDeclaration().
...
For multiple redeclarations they return the first one.
llvm-svn: 75602
2009-07-14 03:19:57 +00:00
Argyrios Kyrtzidis
ef1c1e572c
For C++ overloaded operator calls, set the source location of the DeclRefExpr to the location of the operator.
...
llvm-svn: 75600
2009-07-14 03:19:38 +00:00
Argyrios Kyrtzidis
eeaaead736
Read/write a CXXOperatorCallExpr from/to PCH files.
...
llvm-svn: 75598
2009-07-14 03:19:21 +00:00
Argyrios Kyrtzidis
11a846ab53
Fixes for a couple of things:
...
- Declaration context of ParmVarDecls (that we got from the Declarator) was not their containing function.
- C++ out-of-line method definitions didn't get an access specifier.
Both were exposed by a crash when emitting a C++ method to a PCH file (assert at Decl::CheckAccessDeclContext()).
llvm-svn: 75597
2009-07-14 03:18:53 +00:00
Argyrios Kyrtzidis
307b0717f7
In ResolveLocationInAST, handle locations that are inside TagDecl definitions.
...
llvm-svn: 75594
2009-07-14 03:18:17 +00:00
Argyrios Kyrtzidis
a28d145cbb
In DeclReferenceMap, map FieldDecls to the MemberExprs that reference them.
...
llvm-svn: 75593
2009-07-14 03:18:09 +00:00
Argyrios Kyrtzidis
664b690107
Read/write TagDecl's RBraceLoc from/to PCH files.
...
llvm-svn: 75592
2009-07-14 03:18:02 +00:00
Argyrios Kyrtzidis
23e1f1d6be
Pass the right brace SourceLocation from the Parser to the TagDecls.
...
llvm-svn: 75591
2009-07-14 03:17:52 +00:00
Argyrios Kyrtzidis
575fa05991
Add the SourceLocation for the right brace in TagDecl.
...
llvm-svn: 75590
2009-07-14 03:17:17 +00:00
Devang Patel
d6c256696b
Use LLVM mangler to get mangled name for debug info entry.
...
llvm-svn: 75589
2009-07-14 02:47:58 +00:00
Daniel Dunbar
f5c79709bc
Update debug info generation for ObjCObjectPointer changes.
...
- Previously this would crash on recursive types, and it was also incorrectly
stripping off a level of indirection.
- I'm not 100% convinced this is all correct, but it should be a monotonic
improvment.
llvm-svn: 75582
2009-07-14 01:20:56 +00:00
Zhongxing Xu
170e816eff
Instead of recovering from a wrong invalidation, this patch aims to
...
invalidate the region correctly. It uses the cast-to type to invalidate
the region when available. To avoid invalid cast-to type like 'void*' or 'id',
region store now only records non-generic casts of regions.
llvm-svn: 75580
2009-07-14 01:12:46 +00:00
Ted Kremenek
c057f417d8
Add basic checking for passing NULL to CFRetain/CFRelease, since those functions
...
are not explicitly marked as not accepting NULL pointers. This check illustrates
how we need more refactoring in the custom-check logic.
llvm-svn: 75570
2009-07-14 00:43:42 +00:00
Owen Anderson
2571eb6453
Update for API change.
...
llvm-svn: 75569
2009-07-14 00:38:16 +00:00
Ted Kremenek
a6904ff7f9
Tidy pretty-printing for SVals, using 'dump()' instead of 'printStdErr()', and implementing operator<< support for llvm::raw_ostream.
...
llvm-svn: 75560
2009-07-13 23:53:06 +00:00
Ted Kremenek
c8d6746c39
When pretty-printing symbolic regions, use '{' ... '}' to indicate the symbol used for the region (makes it easier to read for nested regions).
...
llvm-svn: 75550
2009-07-13 23:38:57 +00:00
Fariborz Jahanian
44e56ca949
Fixes a minor bug in pretty printing of ctor defs.
...
llvm-svn: 75549
2009-07-13 23:31:10 +00:00
Ted Kremenek
eabdd984b1
Change pretty-printing API for SymExprs and MemRegions to use a naming convention and style similar to other elements in Clang.
...
llvm-svn: 75548
2009-07-13 23:31:04 +00:00
Ted Kremenek
b63f71528e
Enhance SimpleSValuator::EvalBinOpNN to recognize the trivial case
...
where we are comparing a symbolic value against itself, regardless of
the nature of that symbolic value.
This enhancement identified a case where RegionStoreManager is not
correctly symbolicating the values of the pointees of parameters. The
failing test is now in 'test/Analysis/misc-ps-region-store.m', with
that test file now (temporarily) marked XFAIL.
llvm-svn: 75521
2009-07-13 21:55:12 +00:00
Daniel Dunbar
9ab53d2b17
Explicitly initialize the options array, MinGW's gcc 4.3.5 appears to have a bug
...
in array value-initialization.
llvm-svn: 75518
2009-07-13 21:50:47 +00:00
Daniel Dunbar
48b4d1e27e
There is no need to value initialize this array.
...
llvm-svn: 75517
2009-07-13 21:48:50 +00:00
Steve Naroff
a63372da72
Remove superfluous call to getAsPointerType()...
...
llvm-svn: 75509
2009-07-13 21:32:29 +00:00
Steve Naroff
aacd4cce73
Sema::CheckAdditionOperands(): Use Type::getPointeeType() and remove PTy and OPT variables.
...
llvm-svn: 75505
2009-07-13 21:20:41 +00:00
Chris Lattner
d1d820ed51
add netbsd support, patch by Krister Kalfridsson!
...
llvm-svn: 75492
2009-07-13 20:29:08 +00:00
Fariborz Jahanian
494720b7f7
Added pretty-printing support for constructor definition.
...
llvm-svn: 75487
2009-07-13 20:18:13 +00:00
Steve Naroff
2efbbe3531
- Improve comment for Type::getPointeeType().
...
- Remove a couple redundant casts/returns.
- Fix 80 column violations for all getAsStringInternal() methods.
llvm-svn: 75485
2009-07-13 19:06:52 +00:00
Steve Naroff
4eed7a16d6
Fix 5 issues from Chris's feedback on http://llvm.org/viewvc/llvm-project?view=rev&revision=75314 .
...
Still more to come...just wanted to get the no-brainers out of the way.
llvm-svn: 75477
2009-07-13 17:19:15 +00:00
Devang Patel
9c3a0188cd
Update debug info type cache after fwd decl is replaced by real decl.
...
llvm-svn: 75473
2009-07-13 17:03:14 +00:00
Devang Patel
290b052d43
Fix comment.
...
llvm-svn: 75471
2009-07-13 16:15:54 +00:00
Owen Anderson
ae86c19e68
Update for LLVM API change.
...
llvm-svn: 75446
2009-07-13 04:10:07 +00:00
Chris Lattner
e7cabb94a3
minor cleanups, reduce nesting of if's with early return.
...
llvm-svn: 75442
2009-07-13 00:10:46 +00:00
Chris Lattner
c9f6c334f0
fix file headers.
...
llvm-svn: 75437
2009-07-12 22:33:12 +00:00
Chris Lattner
fb42a1820f
add push/pop semantics for diagnostics. Patch by Louis Gerbarg!
...
llvm-svn: 75431
2009-07-12 21:18:45 +00:00
Daniel Dunbar
7e5f052772
Fix type conversion of ObjCObjectPointerType.
...
- Previous code was based on a misunderstanding (on my part) of the type
representation.
llvm-svn: 75385
2009-07-11 21:12:14 +00:00
Daniel Dunbar
9d82da40ec
Generate correct prototype for objc_enumerationMutation.
...
- This was a latent bug exposed by the recent objc type changes.
llvm-svn: 75383
2009-07-11 20:32:50 +00:00
Alisdair Meredith
f6eb60a851
Fix breakage on Windows, cannot redeclare loop variable i in the immediate scope of loop. Rename variable to j.
...
llvm-svn: 75365
2009-07-11 14:32:10 +00:00
Ted Kremenek
da03e8443e
Handle insidious corner case exposed by RegionStoreManager when handling void* values that are bound
...
to symbolic regions and then treated like integers.
llvm-svn: 75356
2009-07-11 04:38:49 +00:00
Ted Kremenek
f6f0461a38
Restructure RegionStoreManager::EvalBinOp() as a switch dispatch over different
...
MemRegion kinds. This allows the compiler to identify what MemRegions we don't
handle for pointer arithmetic.
llvm-svn: 75326
2009-07-11 00:58:27 +00:00
Eli Friedman
55179ca5aa
Fix typo (found by gcc warning).
...
llvm-svn: 75325
2009-07-11 00:57:02 +00:00