]> granicus.if.org Git - clang/log
clang
11 years agoFix indentation. No functional change.
Craig Topper [Mon, 19 Aug 2013 03:41:04 +0000 (03:41 +0000)]
Fix indentation. No functional change.

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

11 years agoDebugInfo: Do not include line/file info for artificial parameters & parameters of...
David Blaikie [Mon, 19 Aug 2013 03:37:48 +0000 (03:37 +0000)]
DebugInfo: Do not include line/file info for artificial parameters & parameters of artificial functions

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

11 years agoMake the version of Stmt::operator new that takes ASTContext* call the ASTContext...
Craig Topper [Mon, 19 Aug 2013 03:11:34 +0000 (03:11 +0000)]
Make the version of Stmt::operator new that takes ASTContext* call the ASTContext& version in Stmt inline instead of having two out of line functions that both call to the global versions.

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

11 years agoSema: Remove dead code in CheckTemplateArgumentAddressOfObjectOrFunction
David Majnemer [Mon, 19 Aug 2013 02:43:08 +0000 (02:43 +0000)]
Sema: Remove dead code in CheckTemplateArgumentAddressOfObjectOrFunction

Summary:
DeclRefExpr::getDecl gives us back a ValueDecl, this isa<> check will
never fire.

Reviewers: eli.friedman, doug.gregor, majnemer

Reviewed By: majnemer

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1434

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

11 years agoRevert r188644 to unbreak buildbots.
Craig Topper [Sun, 18 Aug 2013 20:38:37 +0000 (20:38 +0000)]
Revert r188644 to unbreak buildbots.

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

11 years agoRemove Stmt::operator new that takes a ASTContext*. All callers use the ASTContext...
Craig Topper [Sun, 18 Aug 2013 20:03:21 +0000 (20:03 +0000)]
Remove Stmt::operator new that takes a ASTContext*. All callers use the ASTContext& version.

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

11 years agoRevert "Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not...
David Blaikie [Sun, 18 Aug 2013 17:59:12 +0000 (17:59 +0000)]
Revert "Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class""

This reverts commit r188600.

r188640/r188639 fixed the root cause of the crash-on-valid that r188600
originally introduced. This now appears to bootstrap debug clang
successfully to the best of my testing.

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

11 years agoRemove throw() from Stmt::operator new so the compiler will omit the null check on...
Craig Topper [Sun, 18 Aug 2013 17:45:38 +0000 (17:45 +0000)]
Remove throw() from Stmt::operator new so the compiler will omit the null check on the result since ASTContext allocator won't return null.

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

11 years agoDebugInfo: Avoid duplicating types that may be created during the process of creating...
David Blaikie [Sun, 18 Aug 2013 17:36:19 +0000 (17:36 +0000)]
DebugInfo: Avoid duplicating types that may be created during the process of creating their context

A partner to r188639, this is a somewhat heavy-handed fix to the general
issue, since even after that prior change the issue does still
unavoidably arise with template parameters (see test case).

There are other ways we could consider addressing this (see FIXME).

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

11 years agoDebugInfo: Don't emit vbase 'containing types' for context chain limited types
David Blaikie [Sun, 18 Aug 2013 16:55:33 +0000 (16:55 +0000)]
DebugInfo: Don't emit vbase 'containing types' for context chain limited types

Possible minor reduction in debug info & avoid some cases where creating
a context chain could lead to the type the context chain is being
created for, being created. (this is still possible with template
parameters - tests/fixes/improvements to follow)

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

11 years agoInitHeaderSearch.cpp: [Cygwin] Add 4.7.3.
NAKAMURA Takumi [Sun, 18 Aug 2013 15:03:03 +0000 (15:03 +0000)]
InitHeaderSearch.cpp: [Cygwin] Add 4.7.3.

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

11 years agoMake expression allocation methods use a 'const' reference to the ASTContext since...
Craig Topper [Sun, 18 Aug 2013 10:09:15 +0000 (10:09 +0000)]
Make expression allocation methods use a 'const' reference to the ASTContext since the underlying operator new only needs a const reference.

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

11 years agolibclang: cleanup unused includes in public header
Dmitri Gribenko [Sun, 18 Aug 2013 07:57:43 +0000 (07:57 +0000)]
libclang: cleanup unused includes in public header

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

11 years agoFix a use-after-free found in libclang when doing code completion. The
Chandler Carruth [Sun, 18 Aug 2013 07:20:52 +0000 (07:20 +0000)]
Fix a use-after-free found in libclang when doing code completion. The
loop processing the candidates can cause new declerations to be added to
the context, invalidating lookup_result. To avoid that, make a copy of
the list of declarations to iterate over.

I don't have a way to check in a test case for this as it involves
a giant pile of source code and a generated PCH file used to accelerate
code completion, all of this running under ASan.

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

11 years agoDebugInfo: don't require full definitions for friend classes
David Blaikie [Sun, 18 Aug 2013 04:50:23 +0000 (04:50 +0000)]
DebugInfo: don't require full definitions for friend classes

Fixes a crash-on-valid introduced by r188486 (which should've occurred
earlier but for a blatant bug where calling createFwdDecl from the
requireCompleteType callback was useless under -flimit-debug-info and we
were just getting lucky with other later callbacks requiring the type
anyway).

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

11 years ago{c-index-test|c-arcmt-test}/Makefile: Update USEDLIBS along corresponding to clangIndex.
NAKAMURA Takumi [Sun, 18 Aug 2013 03:48:57 +0000 (03:48 +0000)]
{c-index-test|c-arcmt-test}/Makefile: Update USEDLIBS along corresponding to clangIndex.

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

11 years agoPR16927: Don't assert (or, previously, skip) static data members of enumeration type
David Blaikie [Sat, 17 Aug 2013 20:01:53 +0000 (20:01 +0000)]
PR16927: Don't assert (or, previously, skip) static data members of enumeration type

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

11 years agoFix the name and the type of the argument for intrinisc
Juergen Ributzka [Sat, 17 Aug 2013 16:40:09 +0000 (16:40 +0000)]
Fix the name and the type of the argument for intrinisc
_mm256_broadcastsi128_si256 to align with the Intel documentation.

This fixes bug PR 16581 and rdar:14747994.

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

11 years ago+ make scan-build work with Strawberry Perl, ActiveState Perl, cygwin perl and msys...
Anton Yartsev [Sat, 17 Aug 2013 15:43:19 +0000 (15:43 +0000)]
+ make scan-build work with Strawberry Perl, ActiveState Perl, cygwin perl and msys perl ports.

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

11 years agoFix indentation.
Richard Smith [Sat, 17 Aug 2013 00:51:11 +0000 (00:51 +0000)]
Fix indentation.

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

11 years agoRefactor all diagnosing of TypoCorrections through a common function, in
Richard Smith [Sat, 17 Aug 2013 00:46:16 +0000 (00:46 +0000)]
Refactor all diagnosing of TypoCorrections through a common function, in
preparation for teaching this function how to diagnose a correction that
includes importing a module.

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

11 years agoRename libIDE to libIndex.
Argyrios Kyrtzidis [Sat, 17 Aug 2013 00:40:41 +0000 (00:40 +0000)]
Rename libIDE to libIndex.

Per feedback from Chandler, it's better to have libraries with more specific functionality.
LibIndex will contain the indexing functionality of libclang, which includes USR generation.

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

11 years agoRevert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the...
David Blaikie [Sat, 17 Aug 2013 00:06:55 +0000 (00:06 +0000)]
Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class"

This reverts commit r188576.

Reverting while I investigate a selfhosting buildbot failure on Darwin.

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

11 years agoObjectiveC migrator: Add some more routines
Fariborz Jahanian [Fri, 16 Aug 2013 23:35:05 +0000 (23:35 +0000)]
ObjectiveC migrator: Add some more routines
for future work. No change otherwise.

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

11 years agoDon't reject attribute used in an "extern const" variable definition.
Rafael Espindola [Fri, 16 Aug 2013 23:18:50 +0000 (23:18 +0000)]
Don't reject attribute used in an "extern const" variable definition.

Before this patch we would warn and drop the attribute in
extern const char test3[] __attribute__((used)) = "";

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

11 years agoUse the number of parameters in the actual method or function to determine the CallEf...
Ted Kremenek [Fri, 16 Aug 2013 23:14:22 +0000 (23:14 +0000)]
Use the number of parameters in the actual method or function to determine the CallEffects size.

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

11 years agoDebugInfo: Canonicalize namespaces to avoid emitting multiple namespaces with the...
David Blaikie [Fri, 16 Aug 2013 22:52:07 +0000 (22:52 +0000)]
DebugInfo: Canonicalize namespaces to avoid emitting multiple namespaces with the same name but different lines

Updated test case to not rely on line numbers in more cases (it's hard
to use the @ check syntax for debug info test cases (due to the
interesting ordering of metadata) and this case in particular (given the
hash-line directive)) - left a few in there to cover the line number
information for these.

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

11 years agoRetainCountChecker: Replace some loops with std:: algorithms.
Benjamin Kramer [Fri, 16 Aug 2013 21:57:14 +0000 (21:57 +0000)]
RetainCountChecker: Replace some loops with std:: algorithms.

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

11 years agoReplace some DenseMap keys with simpler structures that don't need another DenseMapIn...
Benjamin Kramer [Fri, 16 Aug 2013 21:57:06 +0000 (21:57 +0000)]
Replace some DenseMap keys with simpler structures that don't need another DenseMapInfo specialization.

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

11 years agoRevert r188574. Turns out it isn't needed.
Ted Kremenek [Fri, 16 Aug 2013 21:54:22 +0000 (21:54 +0000)]
Revert r188574.  Turns out it isn't needed.

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

11 years agoDebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable...
David Blaikie [Fri, 16 Aug 2013 20:40:29 +0000 (20:40 +0000)]
DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class

This reduces Clang's .dwo (fission debug info) size by 23% over
Clang+LLVM.

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

11 years agoDebugInfo: Contrain the record type parameter for CollectRecordFields
David Blaikie [Fri, 16 Aug 2013 20:40:25 +0000 (20:40 +0000)]
DebugInfo: Contrain the record type parameter for CollectRecordFields

This is the correct type (as is demonstrated by the fact that the caller
didn't need to change) & will be useful in a future patch.

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

11 years agoNeed summary info. about arguments to
Fariborz Jahanian [Fri, 16 Aug 2013 20:23:36 +0000 (20:23 +0000)]
Need summary info. about arguments to
CF functions coming from static analyzer API.

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

11 years agoThread safety analysis: new test case
DeLesley Hutchins [Fri, 16 Aug 2013 18:28:00 +0000 (18:28 +0000)]
Thread safety analysis: new test case

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

11 years agoIntroduce the clangIDE library.
Argyrios Kyrtzidis [Fri, 16 Aug 2013 18:17:55 +0000 (18:17 +0000)]
Introduce the clangIDE library.

Libclang has a lot of functionality that is inaccessible.
The purpose of clangIDE is to move most of the functionality of libclang to it so we
can expose it and have libclang be more of a thin C wrapper over clangIDE.

Start by moving the USR generation functionality into clangIDE.

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

11 years agoclang-format utils/TableGen/TableGen.cpp.
Rafael Espindola [Fri, 16 Aug 2013 16:46:27 +0000 (16:46 +0000)]
clang-format utils/TableGen/TableGen.cpp.

I have a patch that edits the file. Running clang-format first makes the patch
a lot easier to review.

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

11 years agoRefactor ArgumentAdaptativeMatcher matchers to remove the template from their declara...
Samuel Benzaquen [Fri, 16 Aug 2013 16:19:42 +0000 (16:19 +0000)]
Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration.

Summary:
Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration.
This facilitates dynamic registration. Change the registry code to use the regular overload resolution mechanism for adaptative matchers.

Reviewers: klimek

CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1402

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

11 years agoPassing false instead of 0; no functional change intended.
Aaron Ballman [Fri, 16 Aug 2013 13:42:41 +0000 (13:42 +0000)]
Passing false instead of 0; no functional change intended.

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

11 years agoPassing false instead of 0; no functional change intended.
Aaron Ballman [Fri, 16 Aug 2013 13:34:39 +0000 (13:34 +0000)]
Passing false instead of 0; no functional change intended.

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

11 years agoTweak Replacement comparisons
Edwin Vane [Fri, 16 Aug 2013 12:18:53 +0000 (12:18 +0000)]
Tweak Replacement comparisons

* Introduce operator< to replace Replacement::Less
* Make operator== and operator< on Replacements non-member functions
* Change order of comparisons in operator< to do string comparisons last

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

11 years agoSplit UnwrappedLineFormatter into individual components.
Daniel Jasper [Fri, 16 Aug 2013 11:20:30 +0000 (11:20 +0000)]
Split UnwrappedLineFormatter into individual components.

Goals: Structure code better and make components easier to use for
future features (e.g. column layout for long braced initializers).

No functional changes intended.

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

11 years agoRevert r188498.
Evgeniy Stepanov [Fri, 16 Aug 2013 10:35:31 +0000 (10:35 +0000)]
Revert r188498.

This change broke release+asserts build with compiler-rt.

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

11 years agoParse: Do not 'HandleTopLevelDecl' on templated functions.
David Majnemer [Fri, 16 Aug 2013 08:29:13 +0000 (08:29 +0000)]
Parse: Do not 'HandleTopLevelDecl' on templated functions.

Summary:
HandleTopLevelDecl on a templated function leads us to try and mangle
it.

Reviewers: rsmith

Reviewed By: rsmith

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1412

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

11 years agoFix typo pointed out by Jordan.
Ted Kremenek [Fri, 16 Aug 2013 06:22:23 +0000 (06:22 +0000)]
Fix typo pointed out by Jordan.

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

11 years agoWindows ToolChain: add VS bin dir to PogramPaths
Hans Wennborg [Fri, 16 Aug 2013 03:15:10 +0000 (03:15 +0000)]
Windows ToolChain: add VS bin dir to PogramPaths

We have a lot of fancy logic to find Visual Studio, which is currently used
to set the system header include paths.

Use the same code to set the ProgramPaths, which is used for finding programs
such as link.exe. Previously, Clang would just search PATH for link.exe,
but now it should find it if it's able to find Visual Studio.

Differential Revision: http://llvm-reviews.chandlerc.com/D1417

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

11 years ago[analyzer] Merge TextPathDiagnostics and ClangDiagPathDiagConsumer.
Jordan Rose [Fri, 16 Aug 2013 01:06:30 +0000 (01:06 +0000)]
[analyzer] Merge TextPathDiagnostics and ClangDiagPathDiagConsumer.

This once again restores notes to following their associated warnings
in -analyzer-output=text mode. (This is still only intended for use as a
debugging aid.)

One twist is that the warning locations in "regular" analysis output modes
(plist, multi-file-plist, html, and plist-html) are reported at a different
location on the command line than in the output file, since the command
line has no path context. This commit makes -analyzer-output=text behave
like a normal output format, which means that the *command line output
will be different* in -analyzer-text mode. Again, since -analyzer-text is
a debugging aid and lo-fi stand-in for a regular output mode, this change
makes sense.

Along the way, remove a few pieces of stale code related to the path
diagnostic consumers.

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

11 years agoDon't allow unary negation on scoped enums.
Eli Friedman [Fri, 16 Aug 2013 00:09:18 +0000 (00:09 +0000)]
Don't allow unary negation on scoped enums.

PR16900.

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

11 years agoFix for dependent contexts in alias templates.
Eli Friedman [Thu, 15 Aug 2013 23:59:20 +0000 (23:59 +0000)]
Fix for dependent contexts in alias templates.

When we are parsing a type for an alias template, we are not entering
the context, so we can't look into dependent classes.  Make sure the
parser handles this correctly.

PR16904.

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

11 years agoThread Safety Analysis: fix bug when using TryLock with && and || expressions.
DeLesley Hutchins [Thu, 15 Aug 2013 23:06:33 +0000 (23:06 +0000)]
Thread Safety Analysis: fix bug when using TryLock with && and || expressions.

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

11 years agoDebugInfo: CollectRecordStaticField -> CreateRecordStaticField to return its result.
David Blaikie [Thu, 15 Aug 2013 22:50:29 +0000 (22:50 +0000)]
DebugInfo: CollectRecordStaticField -> CreateRecordStaticField to return its result.

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

11 years agoRemove unnecessary explicit cast.
David Blaikie [Thu, 15 Aug 2013 22:42:12 +0000 (22:42 +0000)]
Remove unnecessary explicit cast.

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

11 years agoDebugInfo: Split out the implementation of getStaticDataMemberDeclaration for future use
David Blaikie [Thu, 15 Aug 2013 22:30:23 +0000 (22:30 +0000)]
DebugInfo: Split out the implementation of getStaticDataMemberDeclaration for future use

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

11 years agoObjetiveC migrator: fix the test in my last patch
Fariborz Jahanian [Thu, 15 Aug 2013 22:26:10 +0000 (22:26 +0000)]
ObjetiveC migrator: fix the test in my last patch
to define real CF_RETURNS_RETAINED/CF_NO_RETURNS_RETAINED
pairs.

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

11 years agoFix assert added in r188494
David Blaikie [Thu, 15 Aug 2013 22:18:13 +0000 (22:18 +0000)]
Fix assert added in r188494

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

11 years agoProperly track l-paren of a CXXFucntionalCastExpr.
Eli Friedman [Thu, 15 Aug 2013 22:02:56 +0000 (22:02 +0000)]
Properly track l-paren of a CXXFucntionalCastExpr.

In addition to storing more useful information in the AST, this
fixes a semantic check in template instantiation which checks whether
the l-paren location is valid.

Fixes PR16903.

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

11 years agoDebugInfo: Remove unused conditional
David Blaikie [Thu, 15 Aug 2013 21:55:56 +0000 (21:55 +0000)]
DebugInfo: Remove unused conditional

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

11 years agoObjectiveC migrator. Start annotating CF functions
Fariborz Jahanian [Thu, 15 Aug 2013 21:44:38 +0000 (21:44 +0000)]
ObjectiveC migrator. Start annotating CF functions
with CF_RETURNS_RETAINED/CF_RETURNS_NOT_RETAINED as
appropriate.

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

11 years agoDebugInfo: Make CGDebugInfo::getStaticDataMemberDeclaration's argument type match...
David Blaikie [Thu, 15 Aug 2013 21:42:43 +0000 (21:42 +0000)]
DebugInfo: Make CGDebugInfo::getStaticDataMemberDeclaration's argument type match the semantics

Rather than having a cast immediately inside the function, push that
type requirement out to the callers.

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

11 years agoDebugInfo: Add a FIXME, remove a FIXME.
David Blaikie [Thu, 15 Aug 2013 21:21:19 +0000 (21:21 +0000)]
DebugInfo: Add a FIXME, remove a FIXME.

(the removed FIXME no longer applies since we made this debug info
optimization not apply to C)

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

11 years agomake arm-use-movt available for all ARM
Renato Golin [Thu, 15 Aug 2013 20:54:45 +0000 (20:54 +0000)]
make arm-use-movt available for all ARM

This updates clang according to a pending patch for llvm to
rename of the -arm-darwin-use-movt to arm-use-movt to make
it available for all of ARM.

note: please apply this close to the llvm change.

Patch by Jeroen Hofstee.

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

11 years agoDebugInfo: Unify & optimize the lazy addition of record types
David Blaikie [Thu, 15 Aug 2013 20:49:17 +0000 (20:49 +0000)]
DebugInfo: Unify & optimize the lazy addition of record types

Rather than going through the whole getOrCreateType machinery to
manifest a type, cut straight to the implementation because we know we
have to do work.

While the previous implementation was sufficient for the two cases
(completeness and required completeness) we have already (the general
machinery could inspect the type for those attributes & go down the full
definition path), a pending change (to emit info for types when we emit
their vtables) won't have that luxury & we'll need to force the creation
rather than relying on the general purpose routine.

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

11 years agoDebugInfo: Revert change to the return type of createRecordFwdDecl
David Blaikie [Thu, 15 Aug 2013 20:17:25 +0000 (20:17 +0000)]
DebugInfo: Revert change to the return type of createRecordFwdDecl

It still does only return DICompositeType, but I've no need to make that
change right now.

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

11 years agoCodeGen: __uuidof should work even with an incomplete _GUID type
David Majnemer [Thu, 15 Aug 2013 19:59:14 +0000 (19:59 +0000)]
CodeGen: __uuidof should work even with an incomplete _GUID type

Summary:
We would crash in CodeGen::CodeGenModule::EmitUuidofInitializer
because our attempt to enter CodeGen::CodeGenModule::EmitConstantValue
will be foiled: the type of the constant value is incomplete.

Instead, create an unnamed type with the proper layout on all platforms.
Punt the problem of wrongly defined struct _GUID types to the user.
(It's impossible because the TU may never get to see the type and thus
we can't verify that it is suitable.)

This fixes PR16856.

Reviewers: rsmith, rnk, thakis

Reviewed By: rnk

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1375

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

11 years agoAdd another test to my last patch (NS_OPTION vs. NS_ENUM)
Fariborz Jahanian [Thu, 15 Aug 2013 19:27:42 +0000 (19:27 +0000)]
Add another test to my last patch (NS_OPTION vs. NS_ENUM)
ObjectiveC migration.

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

11 years ago[autotools->cmake] Added variable CLANG_VENDOR_UTI.
Michael Gottesman [Thu, 15 Aug 2013 19:22:36 +0000 (19:22 +0000)]
[autotools->cmake] Added variable CLANG_VENDOR_UTI.

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

11 years ago[autotools->cmake] Added CMake support for the preprocessor variable CLANG_REPOSITORY...
Michael Gottesman [Thu, 15 Aug 2013 19:22:33 +0000 (19:22 +0000)]
[autotools->cmake] Added CMake support for the preprocessor variable CLANG_REPOSITORY_STRING.

This is a patch in a longer series of patches to add
capabilities/definitions that are present in the Autotools build chain
and not in the CMake build chain to the CMake build chain.

*NOTE* I am hacking on this in my free time. I will annotate each commit
with the [autotools->cmake] header.

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

11 years agoDebugInfo: remove unnecessary type registration
David Blaikie [Thu, 15 Aug 2013 18:59:44 +0000 (18:59 +0000)]
DebugInfo: remove unnecessary type registration

This happens in the caller a few frames up anyway.

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

11 years agoDebugInfo: Don't create duplicate forward declaration metadata unnecessarily.
David Blaikie [Thu, 15 Aug 2013 18:59:40 +0000 (18:59 +0000)]
DebugInfo: Don't create duplicate forward declaration metadata unnecessarily.

No functionality change, at best a slight (questionable) optimization,
but necessary for correctness of future work.

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

11 years agoFixes a gross conditional in my last patch.
Fariborz Jahanian [Thu, 15 Aug 2013 18:58:00 +0000 (18:58 +0000)]
Fixes a gross conditional in my last patch.
- This line, and those below, will be ignored--

M    lib/ARCMigrate/ObjCMT.cpp

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

11 years agoObjectiveC migrator: In deciding NS_OPTION over
Fariborz Jahanian [Thu, 15 Aug 2013 18:46:37 +0000 (18:46 +0000)]
ObjectiveC migrator: In deciding NS_OPTION over
NS_ENUM, at least one power of 2 enumerator
must be greater than two.

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

11 years ago[analyzer] If realloc fails on an escaped region, that region doesn't leak.
Jordan Rose [Thu, 15 Aug 2013 17:22:06 +0000 (17:22 +0000)]
[analyzer] If realloc fails on an escaped region, that region doesn't leak.

When a region is realloc()ed, MallocChecker records whether it was known
to be allocated or not. If it is, and the reallocation fails, the original
region has to be freed. Previously, when an allocated region escaped,
MallocChecker completely stopped tracking it, so a failed reallocation
still (correctly) wouldn't require freeing the original region. Recently,
however, MallocChecker started tracking escaped symbols, so that if it were
freed we could check that the deallocator matched the allocator. This
broke the reallocation model for whether or not a symbol was allocated.

Now, MallocChecker will actually check if a symbol is owned, and only
require freeing after a failed reallocation if it was owned before.

PR16730

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

11 years agoThread safety analysis: move warnings within lock/unlock functions out of beta.
DeLesley Hutchins [Thu, 15 Aug 2013 15:31:25 +0000 (15:31 +0000)]
Thread safety analysis: move warnings within lock/unlock functions out of beta.

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

11 years ago[Mips][msa] Add support for half
Jack Carter [Thu, 15 Aug 2013 15:16:57 +0000 (15:16 +0000)]
[Mips][msa] Add support for half

Add support for half (a.k.a. __fp16) in builtin descriptions.
The second argument to BUILTIN() now accepts 'h' to represent half.

Patch by Daniel Sanders

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

11 years agoBuild unwind tables by default on NetBSD.
Joerg Sonnenberger [Thu, 15 Aug 2013 15:08:33 +0000 (15:08 +0000)]
Build unwind tables by default on NetBSD.

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

11 years agoUse the integrated assembler on NetBSD/powerpc by default.
Joerg Sonnenberger [Thu, 15 Aug 2013 15:04:56 +0000 (15:04 +0000)]
Use the integrated assembler on NetBSD/powerpc by default.

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

11 years ago[Mips][msa] Added most builtins from add.a to xori
Jack Carter [Thu, 15 Aug 2013 14:47:02 +0000 (14:47 +0000)]
[Mips][msa] Added most builtins from add.a to xori

Includes:
add.a, adds_a, adds_s, adds_u, addv, addvi, andi.b, asub_[su], ave_[su],
aver_[su], bclr, bclri, bins[lr], bins[lr]i, bmnzi, bmzi, bneg, bnegi, bset,
bseti, c(eq|ne), c(eq|ne)i, cl[et]_[su], cl[et]i_[su], copy_[su].[bhw],
div_[su], dotp_[su], dpadd_[su], dpsub_[su], fadd, fceq, fclass, fcl[et], fcne,
fdiv, fexp2, ffint_[su], ffql, ffqr, fill, flog2, fmadd, fmax, fmax_a, fmin,
fmin_a, fmsub, fmul, frint, fseq, fsle, fslt, fsne, fsqr, fsub, ftint_[su],
ftq, ilvev, ilvl, ilvod, ilvr, ldi, frcp, frsqrt, madd_q, maddr_q, maddv,
max_[asu], maxi_[su], min_[asu], mini_[su], mod_[su], msub_q, msubr_q, msubv,
mul_q, mulr_q, mulv, nloc, nlzc, nori, ori, pckev, pckod, pcnt, sat_[su], shf,
sld, sldi, sll, slli, splat, splati, sr[al], sr[al]i, subs_[su], subv, subvi,
xori

Patch by Daniel Sanders

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

11 years agoUpdate sanitizer attribute documentation to match behaviour change in r187967.
Evgeniy Stepanov [Thu, 15 Aug 2013 13:57:11 +0000 (13:57 +0000)]
Update sanitizer attribute documentation to match behaviour change in r187967.

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

11 years agoFix the build failure of Realease version
Hao Liu [Thu, 15 Aug 2013 11:38:54 +0000 (11:38 +0000)]
Fix the build failure of Realease version

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

11 years agoAdd back a test that was removed in r188450
David Majnemer [Thu, 15 Aug 2013 08:34:07 +0000 (08:34 +0000)]
Add back a test that was removed in r188450

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

11 years agoClang and AArch64 backend patches to support shll/shl and vmovl instructions and...
Hao Liu [Thu, 15 Aug 2013 08:26:30 +0000 (08:26 +0000)]
Clang and AArch64 backend patches to support shll/shl and vmovl instructions and ACLE functions

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

11 years ago[-cxx-abi microsoft] Mangle member pointers better
David Majnemer [Thu, 15 Aug 2013 08:13:23 +0000 (08:13 +0000)]
[-cxx-abi microsoft] Mangle member pointers better

Summary:
There were several things going wrong:
- We mangled in useless qualifiers like "volatile void" return types.
- We didn't propagate 64-bit pointer markers sufficiently.
- We mangled qualifiers belonging to the pointee incorrectly.

This fixes PR16844 and PR16848.

Reviewers: rnk, whunt

Reviewed By: rnk

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1353

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

11 years agoCHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail.
Stephen Lin [Thu, 15 Aug 2013 06:47:53 +0000 (06:47 +0000)]
CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail.

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

11 years agoAdd a bit of explanation for FrontendActionFactory.
Stefanus Du Toit [Thu, 15 Aug 2013 00:35:46 +0000 (00:35 +0000)]
Add a bit of explanation for FrontendActionFactory.

Also use the more common "derive from" in place of "extend" in another
comment.

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

11 years agoAdd ctorInitializer to the dynamic AST Matcher registry.
Stefanus Du Toit [Thu, 15 Aug 2013 00:33:08 +0000 (00:33 +0000)]
Add ctorInitializer to the dynamic AST Matcher registry.

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

11 years agoObjectiveC [Sema]. This patch makes sure that all inherited
Fariborz Jahanian [Wed, 14 Aug 2013 23:58:55 +0000 (23:58 +0000)]
ObjectiveC [Sema]. This patch makes sure that all inherited
properties (direct or indirect) setter/getter (or declared
methods as well) are seen by the method implementation type
matching logic before declaration of method in super class
is seen. This fixes the warning coming out of that method mismatch.
// rdar://14650159

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

11 years ago[static analyzer] add a simple "CallEffects" API to query the retain count semantics...
Ted Kremenek [Wed, 14 Aug 2013 23:41:49 +0000 (23:41 +0000)]
[static analyzer] add a simple "CallEffects" API to query the retain count semantics of a method.

This is intended to be a simplified API, whose internals are
deliberately less efficient for the purpose of a simplified interface,
for use with clients that want to query the analyzer's heuristics for
determining retain count semantics.

There are no immediate clients, but it is intended to be used
by the ObjC modernizer.

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

11 years ago[static analyzer] Factor out ArgEffect and RetEffect into public header file.
Ted Kremenek [Wed, 14 Aug 2013 23:41:46 +0000 (23:41 +0000)]
[static analyzer] Factor out ArgEffect and RetEffect into public header file.

This is a WIP change to allow other clients to query the retain count
heuristics of the static analyzer.

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

11 years agoRelax testcase for r188400 to not test for forward-slashes as path separators.
Adrian Prantl [Wed, 14 Aug 2013 22:10:17 +0000 (22:10 +0000)]
Relax testcase for r188400 to not test for forward-slashes as path separators.

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

11 years agoPR16875: The return type of a dependent function type is visible when it's
Richard Smith [Wed, 14 Aug 2013 20:16:31 +0000 (20:16 +0000)]
PR16875: The return type of a dependent function type is visible when it's
referenced as a member of the current instantiation. In that case, deduce the
type of the function to a dependent type rather than exposing an undeduced auto
type to the rest of the current instantiation.

The standard doesn't really say that the type is dependent in this case; I'll
bring this up with CWG.

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

11 years agoBug fix: note diagnosis on expression narrowing should say "variable template" instea...
Larisse Voufo [Wed, 14 Aug 2013 20:15:02 +0000 (20:15 +0000)]
Bug fix: note diagnosis on expression narrowing should say "variable template" instead of "static data member" when appropriate

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

11 years agoFix grammar mistake.
Shuxin Yang [Wed, 14 Aug 2013 20:07:23 +0000 (20:07 +0000)]
Fix grammar mistake.

Thank Richard Smith for figuring out this problem.

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

11 years agoDo no use -emit-llvm for -flto.
Shuxin Yang [Wed, 14 Aug 2013 19:45:49 +0000 (19:45 +0000)]
Do no use -emit-llvm for -flto.

Tested on multiple OSes.

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

11 years agoTestcase for r188400.
Benjamin Kramer [Wed, 14 Aug 2013 19:45:27 +0000 (19:45 +0000)]
Testcase for r188400.

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

11 years agoAdd support for -fsanitize-blacklist and default blacklists for DFSan.
Peter Collingbourne [Wed, 14 Aug 2013 18:54:18 +0000 (18:54 +0000)]
Add support for -fsanitize-blacklist and default blacklists for DFSan.
Also add some documentation.

Differential Revision: http://llvm-reviews.chandlerc.com/D1346

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

11 years agoEnhance the clang -v gcc debug printing to skip obviously bad and duplicate paths.
Benjamin Kramer [Wed, 14 Aug 2013 18:38:51 +0000 (18:38 +0000)]
Enhance the clang -v gcc debug printing to skip obviously bad and duplicate paths.

Otherwise it lists all files (e.g. shared libraries) that happen to be in the
same paths the GCC installations usually reside in.

On a x86_64 Debian 7 system with i386 multilibs.
before: clang -v 2>&1|wc -l
        3059
after:  clang -v 2>&1|wc -l
        10

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

11 years ago[tests] Reapply r188354, ensure subsitution string is ascii.
Daniel Dunbar [Wed, 14 Aug 2013 16:32:20 +0000 (16:32 +0000)]
[tests] Reapply r188354, ensure subsitution string is ascii.

 - Now fixed to ensure substitution value isn't of unicode type on Python 2.6-7.

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

11 years agoRevert r188354, "[tests] Ensure subsitution string is ascii."
NAKAMURA Takumi [Wed, 14 Aug 2013 14:57:01 +0000 (14:57 +0000)]
Revert r188354, "[tests] Ensure subsitution string is ascii."

It caused "shell parser error" on win32 internal shell. ShParser doesn't expect unicode, but str.

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

11 years ago[tests] Ensure subsitution string is ascii.
Daniel Dunbar [Wed, 14 Aug 2013 05:05:39 +0000 (05:05 +0000)]
[tests] Ensure subsitution string is ascii.

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

11 years agorevert 188352
Shuxin Yang [Wed, 14 Aug 2013 04:47:39 +0000 (04:47 +0000)]
revert 188352

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

11 years agoDriver::IsUsingLTO() no longer return true when seeing -emit-llvm.
Shuxin Yang [Wed, 14 Aug 2013 04:36:53 +0000 (04:36 +0000)]
Driver::IsUsingLTO() no longer return true when seeing -emit-llvm.

The rationale for this change is to differentiate following two situations:
  1) clang -c -emit-llvm a.c
  2) clang -c -flto a.c

Reviewed by Eric Christopher. Thanks a lot!

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