Benjamin Kramer
db0fc5131d
Print NamedDecls directly to a raw_ostream where possible.
...
llvm-svn: 149982
2012-02-07 11:57:57 +00:00
Benjamin Kramer
2f56992964
Switch the ObjC*Decl raw_stream overloads to take a reference, for consistency with NamedDecls.
...
llvm-svn: 149981
2012-02-07 11:57:45 +00:00
Douglas Gregor
e31e606ff3
Introduce basic ASTs for lambda expressions. This covers:
...
- Capturing variables by-reference and by-copy within a lambda
- The representation of lambda captures
- The creation of the non-static data members in the lambda class
that store the captured variables
- The initialization of the non-static data members from the
captured variables
- Pretty-printing lambda expressions
There are a number of FIXMEs, both explicit and implied, including:
- Creating a field for a capture of 'this'
- Improved diagnostics for initialization failures when capturing
variables by copy
- Dealing with temporaries created during said initialization
- Template instantiation
- AST (de-)serialization
- Binding and returning the lambda expression; turning it into a
proper temporary
- Lots and lots of semantic constraints
- Parameter pack captures
llvm-svn: 149977
2012-02-07 10:09:13 +00:00
Bill Wendling
8392a47174
Use SmallVector instead of std::vector.
...
llvm-svn: 149976
2012-02-07 09:40:07 +00:00
Bill Wendling
cb5b5ff36f
Use 'ArrayRef<>' instead of 'std::vector<>&' for passed-in arguments.
...
llvm-svn: 149975
2012-02-07 09:25:09 +00:00
Bill Wendling
5313685c2d
Calculate the .size() of the vector once.
...
llvm-svn: 149974
2012-02-07 09:06:01 +00:00
Bill Wendling
d5a2f4406e
Reserve a moderate amount of space for the back-end arguments.
...
llvm-svn: 149973
2012-02-07 09:05:34 +00:00
Eli Friedman
a767941651
Fix a bug in semantic analysis involving anonymous structs and flexible arrays.
...
llvm-svn: 149966
2012-02-07 05:00:47 +00:00
Eli Friedman
2beed114ba
Fix a couple of nasty bugs involving negative enum constants. <rdar://problem/10760113>.
...
llvm-svn: 149965
2012-02-07 04:34:38 +00:00
Eli Friedman
1b125c3e31
Make FunctionDecl::doesDeclarationForceExternallyVisibleDefinition use the same logic as FunctionDecl::isInlineDefinitionExternallyVisible to figure out whether to emit a definition. Based on work by Anton Yartsev.
...
llvm-svn: 149963
2012-02-07 03:50:18 +00:00
Ted Kremenek
0298834e46
Create PathDiagnosticCallEnter and PathDiagnosticCallExit, to remark calls in PathDiagnostics from other events. This will
...
have potential uses later.
llvm-svn: 149960
2012-02-07 02:27:37 +00:00
Ted Kremenek
7d88ff436b
Tweak BugReporter extensive diagnostics to not add edges between function calls.
...
llvm-svn: 149959
2012-02-07 02:26:17 +00:00
Ted Kremenek
8ffd764702
Quote name of function in path diagnostics.
...
llvm-svn: 149958
2012-02-07 02:26:14 +00:00
Kaelyn Uhrain
1c75d4084d
Remove the unused TypoCorrectionConsumer::MaxEditDistance.
...
MaxEditDistance was effectively unused as it being initialized to the max
unsigned valued but never updated. Removing it avoids conversion
headaches once the "edit distance" of a typo correction is a weighted
composite of several values instead of roughly the number of characters
changed; comparing the weighted composite value to the number of
characters in a typo would require some form of normalization to make it
comparable to the old, character-based notion of edit distance.
llvm-svn: 149953
2012-02-07 01:32:58 +00:00
Bob Wilson
7ecbd32e4e
Filter a few more options not recognized by gcc. <rdar://problem/10814020>
...
These are new options that gcc doesn't recognize so the clang driver needs
to remove them when it falls back to invoking gcc.
llvm-svn: 149951
2012-02-07 01:17:55 +00:00
Eli Friedman
96efec99eb
Add C11 FLT_TRUE_MIN and friends. <rdar://problem/10812837>.
...
llvm-svn: 149949
2012-02-07 01:02:19 +00:00
Anna Zaks
e0c7c27473
[analyzer] Allow each CString check to be enabled/disabled
...
separately.
llvm-svn: 149947
2012-02-07 00:56:14 +00:00
Bill Wendling
7ac747245f
Bump up the initial vector size to avoid having to grow the vector more often.
...
llvm-svn: 149945
2012-02-07 00:54:58 +00:00
Chris Lattner
ece0409a1a
simplify a bunch of code to use the well-known LLVM IR types computed by CodeGenModule.
...
llvm-svn: 149943
2012-02-07 00:39:47 +00:00
Ted Kremenek
a2bbac3ffc
Add basic BugReporter support for CallEnter/CallExit. WIP.
...
llvm-svn: 149939
2012-02-07 00:24:33 +00:00
Eli Friedman
dd053f6fba
Misc improvements to the diagnostic when a variable is odr-used in a context that is not allowed to capture variables.
...
Fixes PR11883.
llvm-svn: 149937
2012-02-07 00:15:00 +00:00
Bill Wendling
9972958a89
Use a more efficient container for these values. Also reserve space when using a
...
std::vector.
llvm-svn: 149936
2012-02-07 00:13:27 +00:00
Bill Wendling
1e375fa219
Use a SmallVector instead of std::vector. This improves compilation time in
...
445.gobmk by ~1.7%.
llvm-svn: 149935
2012-02-07 00:04:27 +00:00
Bill Wendling
bf21cacef1
Don't recalculate the size of the array each time through the for-loop.
...
llvm-svn: 149933
2012-02-06 23:46:08 +00:00
Eli Friedman
5f0ca248ac
Fix a minor regression from my potentially-evaluated expression changes.
...
llvm-svn: 149930
2012-02-06 23:29:57 +00:00
Devang Patel
f93d0b8b28
Relax valid location check. This fixes a clang crash while emitting debug info for properties that are synthesized by the compiler by default.
...
llvm-svn: 149929
2012-02-06 23:24:13 +00:00
Chris Lattner
02cb1715ec
build wide strings with ConstantDataArray, just because we can.
...
llvm-svn: 149928
2012-02-06 22:52:04 +00:00
Chris Lattner
00a10caeb6
improve the code that handles IR generation of byte-sized string literals to avoid
...
allocating an std::string.
llvm-svn: 149924
2012-02-06 22:47:00 +00:00
Abramo Bagnara
e0a70b2656
Added source location for the template keyword in DependentTemplateSpecializationTypeLoc nodes (DTSTLoc).
...
The new info is propagated to TSTLoc on template instantiation, getting rid of 3 FIXMEs in TreeTransform.h and another one Parser.cpp.
Simplified code in TypeSpecLocFiller visitor methods for DTSTLoc and DependentNameTypeLoc by removing what now seems to be dead code (adding corresponding assertions).
llvm-svn: 149923
2012-02-06 22:45:07 +00:00
Chris Lattner
3def9aeaff
use cheaper llvm APIs for various bits of IR generation.
...
llvm-svn: 149916
2012-02-06 22:16:34 +00:00
Chris Lattner
72977a18db
simplify code and smallvectorize.
...
llvm-svn: 149915
2012-02-06 22:00:56 +00:00
Manuel Klimek
e716741f8b
Canonicalize the base class used in the nested-name-specifier of a generated
...
assignment operator.
llvm-svn: 149909
2012-02-06 21:51:39 +00:00
Eli Friedman
8f66cdffa0
Fix the result of VarDecl::checkInitIsICE so it is consistently accurate in C++11 mode. PR11928.
...
llvm-svn: 149908
2012-02-06 21:50:18 +00:00
Ted Kremenek
d22b98aad2
Tweak format string checking to work with %@ and ObjC toll-free bridging. <rdar://problem/10814120>
...
llvm-svn: 149907
2012-02-06 21:45:29 +00:00
Eric Christopher
65c05fa79c
Rewrite the debug action handling to take -verify into account.
...
Add a quiet option for dwarfdump and move it out of NDEBUG only.
Still requires an option as we don't want this on by default.
llvm-svn: 149894
2012-02-06 19:43:51 +00:00
Eric Christopher
3622221c87
Update the command line here and update the comment, we're just going
...
to leave this as a debug only option for now.
llvm-svn: 149890
2012-02-06 19:13:09 +00:00
Abramo Bagnara
9033e2b358
Removed redundant location info from ElaboratedTypeLoc / DependentNameLoc / DependentTSTLoc. Uniformed names referencing elaborated keyword. No intended functionality changes.
...
llvm-svn: 149889
2012-02-06 19:09:27 +00:00
Fariborz Jahanian
adfe905145
objc: fixes a problem in block type comparison involving
...
enums with underlying type explicitly specified
(feature which is on by default in objective-c).
// rdar://10798770
llvm-svn: 149888
2012-02-06 19:06:20 +00:00
Devang Patel
60fc242545
Let an ivar directly refer property TAG.
...
llvm-svn: 149881
2012-02-06 18:20:02 +00:00
Benjamin Kramer
3bb42f38f4
- Turn the other distribution checks into range compares.
...
- Turn openSUSE version parsing into a StringSwitch
- Add an entry for Fedora release 16 (Verne)
llvm-svn: 149872
2012-02-06 15:33:06 +00:00
Abramo Bagnara
48c05be124
Added location for template keyword in TemplateSpecializationTypeLoc. In the process removed some naming ambiguities.
...
llvm-svn: 149870
2012-02-06 14:41:24 +00:00
Benjamin Kramer
7c3f09d416
Consolidate the ubuntu detection logic a bit, add an entry for Ubuntu 12.04 aka precise pangolin.
...
llvm-svn: 149869
2012-02-06 14:36:09 +00:00
Abramo Bagnara
65f7c3dba2
Fixed instantiation of DependentScopeDeclRefExpr.
...
llvm-svn: 149868
2012-02-06 14:31:00 +00:00
Benjamin Kramer
bf8da9d706
Move instantiateTemplateAttribute into the sema namespace, make helpers static.
...
llvm-svn: 149864
2012-02-06 11:13:08 +00:00
Craig Topper
5b5935d17d
Fix vector splat casts to cast element to the appropriate vector element before inserting into the vector. Fixes PR11930.
...
llvm-svn: 149855
2012-02-06 05:05:50 +00:00
Richard Smith
574e896976
Implement name mangling for scalar value initialization. Reported on IRC by Xeo.
...
llvm-svn: 149854
2012-02-06 02:54:51 +00:00
Aaron Ballman
746c62bf88
Invalid O levels on the command line no longer have a confusing error.
...
llvm-svn: 149852
2012-02-06 00:40:31 +00:00
Benjamin Kramer
2c0dd81b73
Move operator overload out of line. Calling operator<< on a forward declared type doesn't seem to work on MSVC.
...
llvm-svn: 149819
2012-02-05 09:46:30 +00:00
Richard Smith
2de5a939e2
constexpr: Implement DR1358: An instantiation of a constexpr function which
...
can't produce a constant expression is not ill-formed (so long as some
instantiation of that function can produce a constant expression).
llvm-svn: 149802
2012-02-05 02:30:54 +00:00
Chris Lattner
9c81833c8d
reapply the patches reverted in r149477, which enable ConstantDataArray.
...
llvm-svn: 149801
2012-02-05 02:30:40 +00:00