]>
granicus.if.org Git - clang/log
Akira Hatanaka [Wed, 8 Feb 2012 01:31:22 +0000 (01:31 +0000)]
Do not return records with non trivial destructors or copy constructors in
registers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150035
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 8 Feb 2012 01:21:13 +0000 (01:21 +0000)]
[libclang] For CXXOperatorCallExprs, give a valid source location to the DeclRefExpr
that is referencing the member function, so we can index the referenced function.
Fixes rdar://
10762375 &
10324915 & http://llvm.org/PR11192
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150033
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 8 Feb 2012 00:50:52 +0000 (00:50 +0000)]
modern objc rewriter: mode metadata stuff. wip.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150030
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 8 Feb 2012 00:46:41 +0000 (00:46 +0000)]
Only complain about __strong __strong id, not __strong SomeStrongTypedef
or __strong __typeof__(some.strong.thing).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150029
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 8 Feb 2012 00:46:36 +0000 (00:46 +0000)]
Revise the SplitQualType interface to make it its own thing instead of
a typedef of std::pair. This slightly improves type-safety, but mostly
makes code using it clearer to read as well as making it possible to add
methods to the type.
Add such a method for efficiently single-step desugaring a split type.
Add a method to single-step desugaring a locally-unqualified type.
Implement both the SplitQualType and QualType methods in terms of that.
Also, fix a typo ("ObjCGLifetime").
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150028
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 8 Feb 2012 00:23:21 +0000 (00:23 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150026
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 8 Feb 2012 00:23:18 +0000 (00:23 +0000)]
Use the new forward declaration scheme for records. Also add more
caching of results after we create them.
Fixes rdar://
10809898
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150025
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 8 Feb 2012 00:10:20 +0000 (00:10 +0000)]
Remove tabs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150021
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Wed, 8 Feb 2012 00:04:52 +0000 (00:04 +0000)]
If a struct needs to be laid out, and it has not
been completed yet, then complete it if possible.
This fixes some assertion failures encountered by
LLDB.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150020
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 7 Feb 2012 23:31:52 +0000 (23:31 +0000)]
modern objc abi rewriter: mode protocol metadata
for modern objc abi.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150011
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 7 Feb 2012 23:24:49 +0000 (23:24 +0000)]
Fix indentation and an 80-column violation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150010
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jean-Daniel Dupas [Tue, 7 Feb 2012 23:10:53 +0000 (23:10 +0000)]
non-literal strftime format string is not unsafe.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150009
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 7 Feb 2012 22:46:16 +0000 (22:46 +0000)]
[libclang] Do not index implicit C++ member functions. rdar://
10769813
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150007
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 7 Feb 2012 22:29:24 +0000 (22:29 +0000)]
Revert my patches which removed Diagnostic.h includes by moving some operator overloads out of line.
This seems to negatively affect compile time onsome ObjC tests
(which use a lot of partial diagnostics I assume). I have to come
up with a way to keep them inline without including Diagnostic.h
everywhere. Now adding a new diagnostic requires a full rebuild
of e.g. the static analyzer which doesn't even use those diagnostics.
This reverts commit
6496bd10dc3a6d5e3266348f08b6e35f8184bc99 .
This reverts commit
7af19b817ba964ac560b50c1ed6183235f699789 .
This reverts commit
fdd15602a42bbe26185978ef1e17019f6d969aa7 .
This reverts commit
00bd44d5677783527d7517c1ffe45e4d75a0f56f .
This reverts commit
ef9b60ffed980864a8db26ad30344be429e58ff5 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150006
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 7 Feb 2012 20:15:08 +0000 (20:15 +0000)]
objc rewriter: modern metadata for protocol decls. wip.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150002
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 7 Feb 2012 19:55:45 +0000 (19:55 +0000)]
In r149662, setDiagnosticMapping was modified to not allow warnings mapped to
MAP_ERROR to be remapped to MAP_WARNING. These new APIs are being added to
allow the diagnostic mapping's "no Werror" bit to be set, and potentially
downgrade anything already mapped to be a warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150001
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 7 Feb 2012 19:36:38 +0000 (19:36 +0000)]
Make use of const-correct ParseCommandLineOptions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150000
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jean-Daniel Dupas [Tue, 7 Feb 2012 19:01:42 +0000 (19:01 +0000)]
Implements support of format_arg attribute on C++ member.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149998
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 7 Feb 2012 18:55:08 +0000 (18:55 +0000)]
Remove tabs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149996
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 7 Feb 2012 18:40:30 +0000 (18:40 +0000)]
Emit debug info for properites that are not backed by an ivar.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149995
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 7 Feb 2012 17:11:38 +0000 (17:11 +0000)]
objc rewriter: start supporting modern objective-c abi
in objective-c rewriter. wip.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149989
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 7 Feb 2012 16:50:53 +0000 (16:50 +0000)]
Make parsing of objc @implementations more robust.
Parsing of @implementations was based on modifying global state from
the parser; the logic for late parsing of methods was spread in multiple places
making it difficult to have a robust error recovery.
-it was difficult to ensure that we don't neglect parsing the lexed methods.
-it was difficult to setup the original objc container context for parsing the lexed methods
after completing ParseObjCAtImplementationDeclaration and returning to top level context.
Enhance parsing of @implementations by centralizing it in Parser::ParseObjCAtImplementationDeclaration().
ParseObjCAtImplementationDeclaration now returns only after an @implementation is fully parsed;
all the data and logic for late parsing of methods is now in one place.
This allows us to provide code-completion for late parsed methods with mis-matched braces.
rdar://
10775381
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149987
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Tue, 7 Feb 2012 13:46:03 +0000 (13:46 +0000)]
Hex literals without a significand no longer crash the lexer. Fixes bug 7910
Patch by Eitan Adler
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149984
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 7 Feb 2012 11:57:57 +0000 (11:57 +0000)]
Print NamedDecls directly to a raw_ostream where possible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149982
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 7 Feb 2012 11:57:45 +0000 (11:57 +0000)]
Switch the ObjC*Decl raw_stream overloads to take a reference, for consistency with NamedDecls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149981
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 7 Feb 2012 10:09:13 +0000 (10:09 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149977
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 7 Feb 2012 09:40:07 +0000 (09:40 +0000)]
Use SmallVector instead of std::vector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149976
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 7 Feb 2012 09:25:09 +0000 (09:25 +0000)]
Use 'ArrayRef<>' instead of 'std::vector<>&' for passed-in arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149975
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 7 Feb 2012 09:06:01 +0000 (09:06 +0000)]
Calculate the .size() of the vector once.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149974
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 7 Feb 2012 09:05:34 +0000 (09:05 +0000)]
Reserve a moderate amount of space for the back-end arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149973
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 7 Feb 2012 05:00:47 +0000 (05:00 +0000)]
Fix a bug in semantic analysis involving anonymous structs and flexible arrays.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149966
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 7 Feb 2012 04:34:38 +0000 (04:34 +0000)]
Fix a couple of nasty bugs involving negative enum constants. <rdar://problem/
10760113 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149965
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Feb 2012 03:56:27 +0000 (03:56 +0000)]
Update test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149964
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 7 Feb 2012 03:50:18 +0000 (03:50 +0000)]
Make FunctionDecl::doesDeclarationForceExternallyVisibleDefinition use the same logic as FunctionDecl::isInlineDefinitionExternallyVisible to figure out whether to emit a definition. Based on work by Anton Yartsev.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149963
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Feb 2012 02:27:37 +0000 (02:27 +0000)]
Create PathDiagnosticCallEnter and PathDiagnosticCallExit, to remark calls in PathDiagnostics from other events. This will
have potential uses later.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149960
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Feb 2012 02:26:17 +0000 (02:26 +0000)]
Tweak BugReporter extensive diagnostics to not add edges between function calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149959
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Feb 2012 02:26:14 +0000 (02:26 +0000)]
Quote name of function in path diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149958
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Tue, 7 Feb 2012 01:32:58 +0000 (01:32 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149953
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 7 Feb 2012 01:17:55 +0000 (01:17 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149951
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 7 Feb 2012 01:02:19 +0000 (01:02 +0000)]
Add C11 FLT_TRUE_MIN and friends. <rdar://problem/
10812837 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149949
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 7 Feb 2012 00:56:14 +0000 (00:56 +0000)]
[analyzer] Allow each CString check to be enabled/disabled
separately.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149947
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 7 Feb 2012 00:54:58 +0000 (00:54 +0000)]
Bump up the initial vector size to avoid having to grow the vector more often.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149945
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 7 Feb 2012 00:39:47 +0000 (00:39 +0000)]
simplify a bunch of code to use the well-known LLVM IR types computed by CodeGenModule.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149943
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 7 Feb 2012 00:39:21 +0000 (00:39 +0000)]
tidy up code, make the common case (1-byte strings) come first
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149942
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 7 Feb 2012 00:24:33 +0000 (00:24 +0000)]
Add basic BugReporter support for CallEnter/CallExit. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149939
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 7 Feb 2012 00:15:00 +0000 (00:15 +0000)]
Misc improvements to the diagnostic when a variable is odr-used in a context that is not allowed to capture variables.
Fixes PR11883.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149937
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 7 Feb 2012 00:13:27 +0000 (00:13 +0000)]
Use a more efficient container for these values. Also reserve space when using a
std::vector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149936
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 7 Feb 2012 00:04:27 +0000 (00:04 +0000)]
Use a SmallVector instead of std::vector. This improves compilation time in
445.gobmk by ~1.7%.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149935
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 6 Feb 2012 23:46:08 +0000 (23:46 +0000)]
Don't recalculate the size of the array each time through the for-loop.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149933
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 6 Feb 2012 23:34:35 +0000 (23:34 +0000)]
Minor comment clarification.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149931
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 6 Feb 2012 23:29:57 +0000 (23:29 +0000)]
Fix a minor regression from my potentially-evaluated expression changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149930
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 6 Feb 2012 23:24:13 +0000 (23:24 +0000)]
Relax valid location check. This fixes a clang crash while emitting debug info for properties that are synthesized by the compiler by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149929
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 6 Feb 2012 22:52:04 +0000 (22:52 +0000)]
build wide strings with ConstantDataArray, just because we can.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149928
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 6 Feb 2012 22:47:00 +0000 (22:47 +0000)]
improve the code that handles IR generation of byte-sized string literals to avoid
allocating an std::string.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149924
91177308 -0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Mon, 6 Feb 2012 22:45:07 +0000 (22:45 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149923
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 6 Feb 2012 22:16:34 +0000 (22:16 +0000)]
use cheaper llvm APIs for various bits of IR generation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149916
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 6 Feb 2012 22:00:56 +0000 (22:00 +0000)]
simplify code and smallvectorize.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149915
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Mon, 6 Feb 2012 21:51:39 +0000 (21:51 +0000)]
Canonicalize the base class used in the nested-name-specifier of a generated
assignment operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149909
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 6 Feb 2012 21:50:18 +0000 (21:50 +0000)]
Fix the result of VarDecl::checkInitIsICE so it is consistently accurate in C++11 mode. PR11928.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149908
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 6 Feb 2012 21:45:29 +0000 (21:45 +0000)]
Tweak format string checking to work with %@ and ObjC toll-free bridging. <rdar://problem/
10814120 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149907
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Mon, 6 Feb 2012 20:47:31 +0000 (20:47 +0000)]
Added MSVC visualizers for PointerIntPair and PointerUnions.
Patch by Nikola Smiljanic
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149896
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 6 Feb 2012 19:43:51 +0000 (19:43 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149894
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 6 Feb 2012 19:13:09 +0000 (19:13 +0000)]
Update the command line here and update the comment, we're just going
to leave this as a debug only option for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149890
91177308 -0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Mon, 6 Feb 2012 19:09:27 +0000 (19:09 +0000)]
Removed redundant location info from ElaboratedTypeLoc / DependentNameLoc / DependentTSTLoc. Uniformed names referencing elaborated keyword. No intended functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149889
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 6 Feb 2012 19:06:20 +0000 (19:06 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149888
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 6 Feb 2012 18:20:02 +0000 (18:20 +0000)]
Let an ivar directly refer property TAG.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149881
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 6 Feb 2012 15:33:06 +0000 (15:33 +0000)]
- Turn the other distribution checks into range compares.
- Turn openSUSE version parsing into a StringSwitch
- Add an entry for Fedora release 16 (Verne)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149872
91177308 -0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Mon, 6 Feb 2012 14:41:24 +0000 (14:41 +0000)]
Added location for template keyword in TemplateSpecializationTypeLoc. In the process removed some naming ambiguities.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149870
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 6 Feb 2012 14:36:09 +0000 (14:36 +0000)]
Consolidate the ubuntu detection logic a bit, add an entry for Ubuntu 12.04 aka precise pangolin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149869
91177308 -0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Mon, 6 Feb 2012 14:31:00 +0000 (14:31 +0000)]
Fixed instantiation of DependentScopeDeclRefExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149868
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 6 Feb 2012 11:13:08 +0000 (11:13 +0000)]
Move instantiateTemplateAttribute into the sema namespace, make helpers static.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149864
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 6 Feb 2012 08:31:19 +0000 (08:31 +0000)]
Test for r149855.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149862
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 6 Feb 2012 05:05:50 +0000 (05:05 +0000)]
Fix vector splat casts to cast element to the appropriate vector element before inserting into the vector. Fixes PR11930.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149855
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 6 Feb 2012 02:54:51 +0000 (02:54 +0000)]
Implement name mangling for scalar value initialization. Reported on IRC by Xeo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149854
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Mon, 6 Feb 2012 00:40:31 +0000 (00:40 +0000)]
Invalid O levels on the command line no longer have a confusing error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149852
91177308 -0d34-0410-b5e6-
96231b3b80d8
Gregory Szorc [Sun, 5 Feb 2012 19:42:06 +0000 (19:42 +0000)]
[clang.py] Implement Type.is_pod
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149842
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Sun, 5 Feb 2012 12:15:56 +0000 (12:15 +0000)]
[clang.py] Change type -> Type
Names that have corresponding classes in python are commonly started with an
uppercase letter. Let's follow that convention.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149831
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Sun, 5 Feb 2012 11:42:25 +0000 (11:42 +0000)]
[clang.py] Implement Cursor.enum_type
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149830
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Sun, 5 Feb 2012 11:42:20 +0000 (11:42 +0000)]
[clang.py] Implement Cursor.underlying_typedef_type
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149829
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Sun, 5 Feb 2012 11:42:14 +0000 (11:42 +0000)]
[clang.py] add TypeKind.VECTOR
Added a missing enumeration.
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149828
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Sun, 5 Feb 2012 11:42:09 +0000 (11:42 +0000)]
[clang.py] Add CursorKind.{is_translation_unit, is_preprocessing, is_unexposed}
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149827
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Sun, 5 Feb 2012 11:42:03 +0000 (11:42 +0000)]
[clang.py] Implement Cursor.hash
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149826
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Sun, 5 Feb 2012 11:41:58 +0000 (11:41 +0000)]
[clang.py] Expose diagnostic category and option info to Python binding
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149825
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Sun, 5 Feb 2012 11:40:59 +0000 (11:40 +0000)]
[clang.py] Implement __eq__ and __ne__ on SourceLocation and SourceRange
There is no type checking in __eq__, so ctypes will throw if the wrong
Python type is passed in to the C function. Personally, I feel garbage
in means garbage out and it isn't worth testing for this explicitly.
Contributed by: Gregory Szorc <gregory.szorc@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149824
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 5 Feb 2012 11:24:56 +0000 (11:24 +0000)]
Fix a typo (builting -> builtin).
Patch by Afriza N. Arief!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149822
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 5 Feb 2012 09:46:30 +0000 (09:46 +0000)]
Move operator overload out of line. Calling operator<< on a forward declared type doesn't seem to work on MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149819
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sun, 5 Feb 2012 03:08:16 +0000 (03:08 +0000)]
Fixing a warning in MSVC (this is also a test commit)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149806
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sun, 5 Feb 2012 02:30:54 +0000 (02:30 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149802
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 5 Feb 2012 02:30:40 +0000 (02:30 +0000)]
reapply the patches reverted in r149477, which enable ConstantDataArray.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149801
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dylan Noblesmith [Sun, 5 Feb 2012 02:13:05 +0000 (02:13 +0000)]
Basic: import SmallString<> into clang namespace
(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dylan Noblesmith [Sun, 5 Feb 2012 02:12:40 +0000 (02:12 +0000)]
Basic: import OwningPtr<> into clang namespace
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149798
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 5 Feb 2012 02:00:07 +0000 (02:00 +0000)]
Try to fix Benjamin's r149781 on MSVC.
MSVC has complained the definition of "inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB, CanQualType T)" in clang/AST/CanonicalType.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149797
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sun, 5 Feb 2012 01:23:16 +0000 (01:23 +0000)]
constexpr: Fix implementation of DR1311: check for volatile qualifiers in
lvalue-to-rvalue conversions on the source type of the conversion, not the
target type (which has them removed for non-class types).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149796
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sat, 4 Feb 2012 23:58:08 +0000 (23:58 +0000)]
Preserve alignment for Neon vld1_lane/dup and vst1_lane intrinsics.
We had been generating load/store instructions with the default alignment
for the vector element type, even when the pointer argument had less alignment.
<rdar://problem/
10538555 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149794
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sat, 4 Feb 2012 23:15:59 +0000 (23:15 +0000)]
Skip freebsd driver test when ppc32/ppc64 targets are not configured.
Otherwise, the clang driver falls back to invoking gcc and the ppc tests
fail.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149793
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 4 Feb 2012 21:27:47 +0000 (21:27 +0000)]
A useful approximation of initializer list constructors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149792
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 4 Feb 2012 21:27:39 +0000 (21:27 +0000)]
Factor out the actual overload resolution from TryConstructorInitialization, since it needs to be used again for list constructor resolution.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149791
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 4 Feb 2012 21:27:33 +0000 (21:27 +0000)]
Don't unwrap initializer lists before calling TryConstructorInitialization, instead doing a little more work inside. This should make finding initializer list constructors easier, as well as fix one place where the ({}) vs {} issue was probably poorly handled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149790
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 4 Feb 2012 21:27:28 +0000 (21:27 +0000)]
Remove an unused and unimplemented function prototype.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149789
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 4 Feb 2012 19:06:06 +0000 (19:06 +0000)]
Also, these objc++ rewriter tests are meant to run in NeXt's
fragile-abi mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149788
91177308 -0d34-0410-b5e6-
96231b3b80d8