Fariborz Jahanian
ff4d5e4c20
objc rewriter: Restore objc_msgSend_stret/objc_msgSendSuper_stret declaration
...
to their fragile-abi representation.
llvm-svn: 141735
2011-10-11 23:02:37 +00:00
Eric Christopher
498b7fd7fe
Start handling debug line and scope information better:
...
Migrate most of the location setting within the larger API in CGDebugInfo and
update a lot of callers.
Remove the existing file/scope change machinery in UpdateLineDirectiveRegion
and replace it with DILexicalBlockFile usage.
Finishes off the rest of rdar://10246360
llvm-svn: 141732
2011-10-11 23:00:55 +00:00
Eric Christopher
fefafacf68
80-column and tab cleanup.
...
llvm-svn: 141731
2011-10-11 23:00:51 +00:00
Eric Christopher
fb4cd4082c
Reorder this to make it easier to add more changes for a location set.
...
llvm-svn: 141730
2011-10-11 23:00:45 +00:00
Eli Friedman
94ab9308d7
PR11062: Make C99 inlining work properly for names with associated builtin libcalls.
...
llvm-svn: 141723
2011-10-11 22:09:24 +00:00
Richard Smith
4ce706afc4
Constant expression evaluation: refactor value initialization and scalar list initialization into base class.
...
llvm-svn: 141717
2011-10-11 21:43:33 +00:00
Eli Friedman
c2025567f5
Silence some -Wuninitialized false positives with gcc.
...
llvm-svn: 141701
2011-10-11 20:00:47 +00:00
Richard Smith
4dd85d6fa1
Add a -Wc++0x-compat warning for C++11 keywords used as identifiers when in
...
C++98 mode. Only the first occurrence of each keyword will produce a warning.
llvm-svn: 141700
2011-10-11 19:57:52 +00:00
Douglas Gregor
9d7c1a2a18
Add support for viewing the module graph via Graphviz, for debugging
...
purposes.
llvm-svn: 141697
2011-10-11 19:27:55 +00:00
Daniel Dunbar
0f41eee2a0
Driver: Add support for a new -nostdlibinc option.
...
- This disables the system include directories, but not the compiler builtin
directories. Useful for projects that want to use things like the intrinsic
headers, but are otherwise freestanding.
- I'm willing to reconsider the option naming, I also considered providing an
explicit -builtinc (which would match -nobuiltininc), but this is more
consistent with existing options.
llvm-svn: 141692
2011-10-11 18:20:16 +00:00
Daniel Dunbar
b25bfde52d
Frontend: Replace -nostdinc by -nostdsysteminc (which is just system include
...
paths). The -nostdinc behavior is now -nostdsysteminc + -nobuiltininc.
llvm-svn: 141691
2011-10-11 18:20:10 +00:00
Anna Zaks
fc2b79029c
[analyzer] Remove an unused member variable.
...
llvm-svn: 141690
2011-10-11 18:19:20 +00:00
John McCall
3cec19f925
Rename SemaCXXCast.cpp to SemaCast.cpp.
...
llvm-svn: 141686
2011-10-11 17:38:55 +00:00
Anna Zaks
8c57c4ba27
[analyzer] CheckerContext updates checkDst in it's destructor, so make sure the object is destructed before checkDst is used.
...
llvm-svn: 141683
2011-10-11 17:29:59 +00:00
Argyrios Kyrtzidis
7a70d2f11b
For the FileChanged Preprocessor callback, when exiting a file, pass its FileID.
...
llvm-svn: 141681
2011-10-11 17:29:44 +00:00
Anna Zaks
cc92521066
[analyzer] Fix a typo.
...
llvm-svn: 141678
2011-10-11 16:49:54 +00:00
Alexis Hunt
77c1f9f888
Get rid of ShouldDeleteMoveConstructor.
...
llvm-svn: 141650
2011-10-11 06:43:29 +00:00
Alexis Hunt
1bc6f71ebc
Consolidate copy constructor deletion into ShouldDeleteSpecialMember.
...
llvm-svn: 141645
2011-10-11 04:55:36 +00:00
Anna Zaks
fedf5dfc71
[analyzer] Warn about the use of insecure, deprecated vfork() function PR11053 ( http://llvm.org/bugs/show_bug.cgi?id=11053 ).
...
A patch by Graham Lee!
llvm-svn: 141643
2011-10-11 04:34:54 +00:00
David Meyer
bfdbb25af2
Allow regparm attribute for PNaCl target
...
llvm-svn: 141638
2011-10-11 03:12:01 +00:00
Eli Friedman
df14b3a837
Initial implementation of __atomic_* (everything except __atomic_is_lock_free).
...
llvm-svn: 141632
2011-10-11 02:20:01 +00:00
Francois Pichet
9a57fb5734
[Microsoft] If -fms-compatibility, then downgrade missing typename error to warning at function prototype scope.
...
llvm-svn: 141630
2011-10-11 01:50:09 +00:00
Kaelyn Uhrain
85308c6ecd
Add typo correction for type names.
...
The main motivation was to do typo correction in C++ "new" statements,
though picking it up in other places where type names are expected was
pretty much a freebie.
llvm-svn: 141621
2011-10-11 01:02:41 +00:00
Lang Hames
4f4aa1a03a
Fixed natural stack alignment for Linux x86-32. Thanks Eli.
...
llvm-svn: 141617
2011-10-11 00:52:51 +00:00
Kaelyn Uhrain
8af2c9f5c6
Clean up DiagnoseInvalidRedeclaration a bit
...
llvm-svn: 141612
2011-10-11 00:28:52 +00:00
Kaelyn Uhrain
e1a9ff7934
Move a couple chunks of ActOnFunctionDeclarator to separate functions
...
llvm-svn: 141611
2011-10-11 00:28:49 +00:00
Kaelyn Uhrain
4dc695daea
Move some bool flags out of function parameter lists.
...
llvm-svn: 141610
2011-10-11 00:28:45 +00:00
Kaelyn Uhrain
0a32fcaf65
Only accept a typo correction if it doesn't trigger additional errors
...
llvm-svn: 141609
2011-10-11 00:28:39 +00:00
Eli Friedman
ce3e02a343
Extend lvalue evaluation in ExprConstant.cpp to handle CK_LValueBitCast (which is completely trivial). PR8836.
...
llvm-svn: 141604
2011-10-11 00:13:24 +00:00
Lang Hames
60b2b2ee0d
Update target data strings for ARM and X86 to include the natural stack
...
alignment parameter "S<size>" that was introduced in r141599.
llvm-svn: 141601
2011-10-10 23:44:43 +00:00
Douglas Gregor
2259d85a43
Don't crash in Sema::IsSimplyAccessible if the declaration is not a C++ class member. Fixes PR11108.
...
llvm-svn: 141600
2011-10-10 23:44:35 +00:00
Eli Friedman
192e034aab
A couple random preprocessor changes that got ported from C99 to C++11.
...
llvm-svn: 141596
2011-10-10 23:35:28 +00:00
Douglas Gregor
c7a3107baf
When performing a user-defined conversion via a constructor, be sure
...
to check whether the constructor is accessible. Fixes
<rdar://problem/10202900>.
llvm-svn: 141588
2011-10-10 22:41:00 +00:00
Ted Kremenek
8f34b6999c
[analyzer] Teach the static analyzer about CXXForRangeStmt. Patch by Jim Goodnow II!
...
llvm-svn: 141587
2011-10-10 22:36:31 +00:00
Ted Kremenek
bed648e0b0
Rework construction of CXXForRangeStmt not to recycle the same DeclRefExpr in multiple subexpressions. This breaks the tree structure
...
of the AST and completely breaks the CFG invariants.
Patch by Jim Goodnow II and reviewed by Richard Smith!
llvm-svn: 141586
2011-10-10 22:36:28 +00:00
Argyrios Kyrtzidis
ebf0136956
[libclang] Implement ConcurrencyCheck using a recursive mutex to allow re-entrancy in the same thread.
...
The checks are performed only in DEBUG, it becomes no-op in release mode.
llvm-svn: 141582
2011-10-10 21:57:12 +00:00
Fariborz Jahanian
55b4e5c208
objc: err on a property designated both atomic and
...
nonatomic. // rdar://10260017
llvm-svn: 141580
2011-10-10 21:53:24 +00:00
Francois Pichet
698f019efb
Revert r140009, about disabling clang's builtin in -fms-compatibility mode.
...
llvm-svn: 141577
2011-10-10 20:34:10 +00:00
Roman Divacky
3403a3b28f
Link in Scrt1.o instead of crt1.o when -pie is specified.
...
llvm-svn: 141573
2011-10-10 19:47:45 +00:00
Douglas Gregor
ab96bcf6ea
When substituting into a sizeof parameter pack expression in a context
...
where we can't expand (i.e., multi-level substitution), be sure to
substitute the pack with its level-reduced pack. Fixes PR10230.
llvm-svn: 141568
2011-10-10 18:59:29 +00:00
Bob Wilson
391214aa3a
Partially revert r141374: allow use of libc++ prior to Mac OS X 10.7.
...
Apple only supports libc++ on OS X 10.7 and later but for the open-source
compiler that restriction doesn't make sense.
llvm-svn: 141566
2011-10-10 18:46:10 +00:00
Chad Rosier
fd3c90c620
When an included non-system directory duplicates a system directory the clang
...
frontend removes the non-system directory to maintain gcc compatibility. When
this happens NumAngled needs to be updated.
PR11097
llvm-svn: 141565
2011-10-10 18:44:24 +00:00
Richard Smith
caf3390d44
Constant expression evaluation refactoring:
...
- Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
behaviour.
- Factor out evaluation of bitfield bit widths.
- Fix a few places which would evaluate an expression twice: once to determine
whether it is a constant expression, then again to get the value.
llvm-svn: 141561
2011-10-10 18:28:20 +00:00
Douglas Gregor
0de5720737
Don't suggest 'noreturn' for function template instantiations, because
...
it might be wrong for other instantiations of the same function
template. Fixes PR10801.
llvm-svn: 141559
2011-10-10 18:15:57 +00:00
Kaelyn Uhrain
1a6eb99d45
Give nicer note when a member redeclaration has or lacks 'const'
...
llvm-svn: 141555
2011-10-10 18:01:37 +00:00
Fariborz Jahanian
9a81f848c8
objc: Some refactoring of overriding method decl. code
...
for future work.
llvm-svn: 141553
2011-10-10 17:53:29 +00:00
Douglas Gregor
6e8da6a291
Don't analyze comparisons in type- or value-dependent
...
subexpressions. Fixes PR10291.
llvm-svn: 141552
2011-10-10 17:38:18 +00:00
Douglas Gregor
556e5860f9
Per C++ [class.bit]p2, unnamed bit-fields are not members. Fixes PR10289.
...
llvm-svn: 141549
2011-10-10 17:22:13 +00:00
Richard Smith
f368fb40df
constexpr: Disable checking of constructor member initializer lists for
...
constexpr constructor templates. Such checking is optional, and currently hard
to get right since clang doesn't generate implicit member initializers until
instantiation (even for non-dependent members).
This is needed for clang to accept libstdc++ from g++4.6 in c++0x mode.
llvm-svn: 141547
2011-10-10 16:38:04 +00:00
Douglas Gregor
bcc9539323
Don't complain about qualified property or ivar access when the
...
qualifier itself is invalid. Crasher noticed by Fariborz.
llvm-svn: 141544
2011-10-10 16:09:49 +00:00