]> granicus.if.org Git - clang/log
clang
12 years agoFactor C++11 lambda expressions implementation into a separate
Douglas Gregor [Wed, 8 Feb 2012 21:18:48 +0000 (21:18 +0000)]
Factor C++11 lambda expressions implementation into a separate
file. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150089 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen computing the type of a local variable reference within a lambda,
Douglas Gregor [Wed, 8 Feb 2012 20:56:50 +0000 (20:56 +0000)]
When computing the type of a local variable reference within a lambda,
only add 'const' for variables captured by copy in potentially
evaluated expressions of non-mutable lambdas. (The "by copy" part was
missing).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150088 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen completing a lambda expression, make sure to check and attach the
Douglas Gregor [Wed, 8 Feb 2012 20:17:14 +0000 (20:17 +0000)]
When completing a lambda expression, make sure to check and attach the
body of the lambda to the function call operator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150087 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] MallocChecker: convert from using evalCall to
Anna Zaks [Wed, 8 Feb 2012 20:13:28 +0000 (20:13 +0000)]
[analyzer] MallocChecker: convert from using evalCall to
post visit of CallExpr.

In general, we should avoid using evalCall as it leads to interference
with other checkers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150086 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMore rewriting of objective-c moderin abi metadata.
Fariborz Jahanian [Wed, 8 Feb 2012 19:53:58 +0000 (19:53 +0000)]
More rewriting of objective-c moderin abi metadata.
All protocol related metadata is close to completion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150084 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFixing hex floating literal support so that it handles 0x.2p2 properly.
Aaron Ballman [Wed, 8 Feb 2012 13:36:33 +0000 (13:36 +0000)]
Fixing hex floating literal support so that it handles 0x.2p2 properly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150072 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCodeGen: Move EHPersonality from CGException.h into the cpp file, it has no other...
Benjamin Kramer [Wed, 8 Feb 2012 12:41:24 +0000 (12:41 +0000)]
CodeGen: Move EHPersonality from CGException.h into the cpp file, it has no other users.

While at it make it value-initializable to get rid of static ctors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150070 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoImplement DR1458: Taking the address of an object of incomplete class type is
Richard Smith [Wed, 8 Feb 2012 08:11:33 +0000 (08:11 +0000)]
Implement DR1458: Taking the address of an object of incomplete class type is
not a constant expression, because we can't tell whether the complete class type
will have an overloaded operator&.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150066 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove vperm2f* and vperm2i builtins. Same effect can be achieved with builtin_shuffl...
Craig Topper [Wed, 8 Feb 2012 07:33:36 +0000 (07:33 +0000)]
Remove vperm2f* and vperm2i builtins. Same effect can be achieved with builtin_shufflevector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150064 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd more testing for r149776.
Richard Smith [Wed, 8 Feb 2012 06:41:34 +0000 (06:41 +0000)]
Add more testing for r149776.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150061 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoImplement the agreed resolution to DR1457: a signed left shift of a 1 bit into
Richard Smith [Wed, 8 Feb 2012 06:14:53 +0000 (06:14 +0000)]
Implement the agreed resolution to DR1457: a signed left shift of a 1 bit into
the sign bit doesn't have undefined behavior, but a signed left shift of a 1 bit
out of the sign bit still does. As promised to Howard :)

The suppression of the potential constant expression checking in system headers
is also removed, since the problem it was working around is gone.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150059 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoA little bit of lambda IRGen.
Eli Friedman [Wed, 8 Feb 2012 05:34:55 +0000 (05:34 +0000)]
A little bit of lambda IRGen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150058 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove vpermilp* builtins. Same effect can be achieved with builtin_shufflevector.
Craig Topper [Wed, 8 Feb 2012 05:16:54 +0000 (05:16 +0000)]
Remove vpermilp* builtins. Same effect can be achieved with builtin_shufflevector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150056 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove -Wcovered-switch-default out of -Wswitch (and -Wall), and make it an opt-in...
Ted Kremenek [Wed, 8 Feb 2012 05:08:58 +0000 (05:08 +0000)]
Move -Wcovered-switch-default out of -Wswitch (and -Wall), and make it an opt-in warning.

This is a great warning, but it was observed that a ton of real world code violates
it all the time for (semi-)legitimate reasons.  This warnings is fairly pedantic, which is good,
but not for everyone.  For example, there is a fair amount of idiomatic code out there
that does "default: abort()", and similar idioms.

Addresses <rdar://problem/10814651>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150055 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoChange PathDiagnosticPieces to be reference counted (simplifying their management...
Ted Kremenek [Wed, 8 Feb 2012 04:32:34 +0000 (04:32 +0000)]
Change PathDiagnosticPieces to be reference counted (simplifying their management), and introduce 'PathPieces' as a common container for PathDiagnosticPieces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150054 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRefactor pieces of PathDiagnostic into its own data structure. No functionality...
Ted Kremenek [Wed, 8 Feb 2012 04:32:27 +0000 (04:32 +0000)]
Refactor pieces of PathDiagnostic into its own data structure.  No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150053 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake sure template argument deduction is consistently performed in an unevaluated...
Eli Friedman [Wed, 8 Feb 2012 03:07:05 +0000 (03:07 +0000)]
Make sure template argument deduction is consistently performed in an unevaluated context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150049 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[libclang] Indexing: When suppressing references, suppress references
Argyrios Kyrtzidis [Wed, 8 Feb 2012 03:04:33 +0000 (03:04 +0000)]
[libclang] Indexing: When suppressing references, suppress references
of bases in C++ classes. rdar://10768707

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150048 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoConstify the getClassName routine and variables that come out of it,
Eric Christopher [Wed, 8 Feb 2012 01:53:14 +0000 (01:53 +0000)]
Constify the getClassName routine and variables that come out of it,
and then use it for forward decl names.

Part of rdar://10209967 and rdar://10400981

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150040 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDo not return records with non trivial destructors or copy constructors in
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

12 years ago[libclang] For CXXOperatorCallExprs, give a valid source location to the DeclRefExpr
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

12 years agomodern objc rewriter: mode metadata stuff. wip.
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

12 years agoOnly complain about __strong __strong id, not __strong SomeStrongTypedef
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

12 years agoRevise the SplitQualType interface to make it its own thing instead of
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

12 years agoWhitespace.
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

12 years agoUse the new forward declaration scheme for records. Also add more
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

12 years agoRemove tabs.
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

12 years agoIf a struct needs to be laid out, and it has not
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

12 years agomodern objc abi rewriter: mode protocol metadata
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

12 years agoFix indentation and an 80-column violation.
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

12 years agonon-literal strftime format string is not unsafe.
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

12 years ago[libclang] Do not index implicit C++ member functions. rdar://10769813
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

12 years agoRevert my patches which removed Diagnostic.h includes by moving some operator overloa...
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

12 years agoobjc rewriter: modern metadata for protocol decls. wip.
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

12 years agoIn r149662, setDiagnosticMapping was modified to not allow warnings mapped to
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

12 years agoMake use of const-correct ParseCommandLineOptions
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

12 years agoImplements support of format_arg attribute on C++ member.
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

12 years agoRemove tabs.
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

12 years agoEmit debug info for properites that are not backed by an ivar.
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

12 years agoobjc rewriter: start supporting modern objective-c abi
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

12 years agoMake parsing of objc @implementations more robust.
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

12 years agoHex literals without a significand no longer crash the lexer. Fixes bug 7910
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

12 years agoPrint NamedDecls directly to a raw_ostream where possible.
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

12 years agoSwitch the ObjC*Decl raw_stream overloads to take a reference, for consistency with...
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

12 years agoIntroduce basic ASTs for lambda expressions. This covers:
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

12 years agoUse SmallVector instead of std::vector.
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

12 years agoUse 'ArrayRef<>' instead of 'std::vector<>&' for passed-in arguments.
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

12 years agoCalculate the .size() of the vector once.
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

12 years agoReserve a moderate amount of space for the back-end arguments.
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

12 years agoFix a bug in semantic analysis involving anonymous structs and flexible arrays.
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

12 years agoFix a couple of nasty bugs involving negative enum constants. <rdar://problem/10760113>.
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

12 years agoUpdate test case.
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

12 years agoMake FunctionDecl::doesDeclarationForceExternallyVisibleDefinition use the same logic...
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

12 years agoCreate PathDiagnosticCallEnter and PathDiagnosticCallExit, to remark calls in PathDia...
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

12 years agoTweak BugReporter extensive diagnostics to not add edges between function calls.
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

12 years agoQuote name of function in path diagnostics.
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

12 years agoRemove the unused TypoCorrectionConsumer::MaxEditDistance.
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

12 years agoFilter a few more options not recognized by gcc. <rdar://problem/10814020>
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

12 years agoAdd C11 FLT_TRUE_MIN and friends. <rdar://problem/10812837>.
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

12 years ago[analyzer] Allow each CString check to be enabled/disabled
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

12 years agoBump up the initial vector size to avoid having to grow the vector more often.
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

12 years agosimplify a bunch of code to use the well-known LLVM IR types computed by CodeGenModule.
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

12 years agotidy up code, make the common case (1-byte strings) come first
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

12 years agoAdd basic BugReporter support for CallEnter/CallExit. WIP.
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

12 years agoMisc improvements to the diagnostic when a variable is odr-used in a context that...
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

12 years agoUse a more efficient container for these values. Also reserve space when using a
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

12 years agoUse a SmallVector instead of std::vector. This improves compilation time in
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

12 years agoDon't recalculate the size of the array each time through the for-loop.
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

12 years agoMinor comment clarification.
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

12 years agoFix a minor regression from my potentially-evaluated expression changes.
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

12 years agoRelax valid location check. This fixes a clang crash while emitting debug info for...
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

12 years agobuild wide strings with ConstantDataArray, just because we can.
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

12 years agoimprove the code that handles IR generation of byte-sized string literals to avoid
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

12 years agoAdded source location for the template keyword in DependentTemplateSpecializationType...
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

12 years agouse cheaper llvm APIs for various bits of IR generation.
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

12 years agosimplify code and smallvectorize.
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

12 years agoCanonicalize the base class used in the nested-name-specifier of a generated
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

12 years agoFix the result of VarDecl::checkInitIsICE so it is consistently accurate in C++11...
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

12 years agoTweak format string checking to work with %@ and ObjC toll-free bridging. <rdar...
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

12 years agoAdded MSVC visualizers for PointerIntPair and PointerUnions.
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

12 years agoRewrite the debug action handling to take -verify into account.
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

12 years agoUpdate the command line here and update the comment, we're just going
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

12 years agoRemoved redundant location info from ElaboratedTypeLoc / DependentNameLoc / Dependent...
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

12 years agoobjc: fixes a problem in block type comparison involving
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

12 years agoLet an ivar directly refer property TAG.
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

12 years ago- Turn the other distribution checks into range compares.
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

12 years agoAdded location for template keyword in TemplateSpecializationTypeLoc. In the process...
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

12 years agoConsolidate the ubuntu detection logic a bit, add an entry for Ubuntu 12.04 aka preci...
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

12 years agoFixed instantiation of DependentScopeDeclRefExpr.
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

12 years agoMove instantiateTemplateAttribute into the sema namespace, make helpers static.
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

12 years agoTest for r149855.
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

12 years agoFix vector splat casts to cast element to the appropriate vector element before inser...
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

12 years agoImplement name mangling for scalar value initialization. Reported on IRC by Xeo.
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

12 years agoInvalid O levels on the command line no longer have a confusing error.
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

12 years ago[clang.py] Implement Type.is_pod
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

12 years ago[clang.py] Change type -> Type
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

12 years ago[clang.py] Implement Cursor.enum_type
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

12 years ago[clang.py] Implement Cursor.underlying_typedef_type
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

12 years ago[clang.py] add TypeKind.VECTOR
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

12 years ago[clang.py] Add CursorKind.{is_translation_unit, is_preprocessing, is_unexposed}
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