]> granicus.if.org Git - clang/log
clang
11 years agoThe only useful loop unrolling flag to give realistically is
Chandler Carruth [Thu, 8 Aug 2013 08:34:35 +0000 (08:34 +0000)]
The only useful loop unrolling flag to give realistically is
'-fno-unroll-loops'. The option to the backend is even called
'DisableUnrollLoops'. This is precisely the form that Clang *didn't*
support. We didn't recognize the flag, we didn't pass it to the CC1
layer, and even if we did we wouldn't use it. Clang only inspected the
positive form of the flag, and only did so to enable loop unrolling when
the optimization level wasn't high enough. This only occurs for an
optimization level that even has a chance of running the loop unroller
when optimizing for size.

This commit wires up the 'no' variant, and switches the code to actually
follow the standard flag pattern of using the last flag and allowing
a flag in either direction to override the default.

I think this is still wrong. I don't know why we disable the loop
unroller entirely *from Clang* when optimizing for size, as the loop
unrolling pass *already has special logic* for the case where the
function is attributed as optimized for size! We should really be
trusting that. Maybe in a follow-up patch, I don't really want to change
behavior here.

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

11 years agoSplit the deprecated increment bool warning into a sub-group of -Wdeprecated
Richard Trieu [Thu, 8 Aug 2013 03:05:52 +0000 (03:05 +0000)]
Split the deprecated increment bool warning into a sub-group of -Wdeprecated
so that it can be toggled independently of other deprecated warnings.

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

11 years agoRevert r187935 "Support for double width characters."
Arnold Schwaighofer [Thu, 8 Aug 2013 02:19:56 +0000 (02:19 +0000)]
Revert r187935 "Support for double width characters."

It broke a public build bot.

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

11 years agoEmit an error for enum increments and decrements in C++ mode.
Richard Trieu [Thu, 8 Aug 2013 01:50:23 +0000 (01:50 +0000)]
Emit an error for enum increments and decrements in C++ mode.
Fixes PR16394.

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

11 years agocatch-undefined-behavior.cpp: Remove names that don't appear in every build.
Filipe Cabecinhas [Thu, 8 Aug 2013 01:24:29 +0000 (01:24 +0000)]
catch-undefined-behavior.cpp: Remove names that don't appear in every build.

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

11 years agoUBSan: Fix naming for IR variables in catch-undef-behavior.cpp
Filipe Cabecinhas [Thu, 8 Aug 2013 01:18:31 +0000 (01:18 +0000)]
UBSan: Fix naming for IR variables in catch-undef-behavior.cpp

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

11 years agoUBSan: Fix alignment checks emitted in downcasts.
Filipe Cabecinhas [Thu, 8 Aug 2013 01:08:17 +0000 (01:08 +0000)]
UBSan: Fix alignment checks emitted in downcasts.

Summary:
UBSan was checking for alignment of the derived class on the pointer to
the base class, before converting. With some class hierarchies, this could
generate false positives.

Added test-case.

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

11 years agoclang-cl: Support the run-time selection options (/MD, /MT et al.)
Hans Wennborg [Thu, 8 Aug 2013 00:17:41 +0000 (00:17 +0000)]
clang-cl: Support the run-time selection options (/MD, /MT et al.)

These flags set some preprocessor macros and injects a dependency
on the runtime library into the object file, which later is picked up
by the linker.

This also adds a new CC1 flag for adding a dependent library.

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

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

11 years agoSupport for double width characters.
Alexander Kornienko [Wed, 7 Aug 2013 23:29:01 +0000 (23:29 +0000)]
Support for double width characters.

Summary: Only works for UTF-8-encoded files.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1311

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

11 years agoDataFlowSanitizer; Clang changes.
Peter Collingbourne [Wed, 7 Aug 2013 22:47:34 +0000 (22:47 +0000)]
DataFlowSanitizer; Clang changes.

DataFlowSanitizer is a generalised dynamic data flow analysis.

Unlike other Sanitizer tools, this tool is not designed to detect a
specific class of bugs on its own.  Instead, it provides a generic
dynamic data flow analysis framework to be used by clients to help
detect application-specific issues within their own code.

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

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

11 years agoFix doxygen function name mismatch.
Hans Wennborg [Wed, 7 Aug 2013 22:34:01 +0000 (22:34 +0000)]
Fix doxygen function name mismatch.

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

11 years agoPR9992: Serialize and deserialize the token sequence for a function template in
Richard Smith [Wed, 7 Aug 2013 21:41:30 +0000 (21:41 +0000)]
PR9992: Serialize and deserialize the token sequence for a function template in
-fdelayed-template-parsing mode. Patch by Will Wilson!

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

11 years ago[PCH] Fix a PCH serialization crash, with invalid code related to forward enum refere...
Argyrios Kyrtzidis [Wed, 7 Aug 2013 21:17:33 +0000 (21:17 +0000)]
[PCH] Fix a PCH serialization crash, with invalid code related to forward enum references.

The problem was that an enum without closing semicolon could be associated as a forward enum
in an erroneous declaration, leading to the identifier being associated with the enum decl but
without a declaration actually referencing it.
This resulted in not having it serialized before serializing the identifier that is associated with.

Also prevent the ASTUnit from querying the serialized DeclID for an invalid top-level decl; it may not
have been serialized.

rdar://14539667

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

11 years agoFixes a couple of bugs with the Allman brace breaking.
Manuel Klimek [Wed, 7 Aug 2013 19:20:45 +0000 (19:20 +0000)]
Fixes a couple of bugs with the Allman brace breaking.

In particular, left braces after an enum declaration now occur on their
own line.  Further, when short ifs/whiles are allowed these no longer
cause the left brace to be on the same line as the if/while when a
brace is included.

Patch by Thomas Gibson-Robinson.

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

11 years agoCorrectly allign arrays on 32 bit systems.
Rafael Espindola [Wed, 7 Aug 2013 18:08:19 +0000 (18:08 +0000)]
Correctly allign arrays on 32 bit systems.

Before this patch we would align

long long int big[1024];

to 4 bytes on 32 bit systems. The problem is that we were only looking
at the element type when getLargeArrayMinWidth returned non zero.

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

11 years agoPatch to fix doxygen trailing comments for ObjectiveC methods.
Fariborz Jahanian [Wed, 7 Aug 2013 16:40:29 +0000 (16:40 +0000)]
Patch to fix doxygen trailing comments for ObjectiveC methods.
// rdar://14258334

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

11 years agoclang-format: Fix corner case in OpenMP pragma formatting.
Daniel Jasper [Wed, 7 Aug 2013 16:29:23 +0000 (16:29 +0000)]
clang-format: Fix corner case in OpenMP pragma formatting.

Before:
  #pragma omp reduction( | : var)
After:
  #pragma omp reduction(| : var)

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

11 years agoEliminate CXXConstructorDecl::IsImplicitlyDefined.
Jordan Rose [Wed, 7 Aug 2013 16:16:48 +0000 (16:16 +0000)]
Eliminate CXXConstructorDecl::IsImplicitlyDefined.

This field is just IsDefaulted && !IsDeleted; in all places it's used,
a simple check for isDefaulted() is superior anyway, and we were forgetting
to set it in a few cases.

Also eliminate CXXDestructorDecl::IsImplicitlyDefined, for the same reasons.

No intended functionality change.

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

11 years agoIndicate success for simple options when clang called with -cc1.
Rafael Espindola [Wed, 7 Aug 2013 12:54:47 +0000 (12:54 +0000)]
Indicate success for simple options when clang called with -cc1.

Patch by David Wiberg.

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

11 years agoDocumentation for sanitizer special case list format and -f(no-)?sanitize-blacklist...
Alexey Samsonov [Wed, 7 Aug 2013 08:23:32 +0000 (08:23 +0000)]
Documentation for sanitizer special case list format and -f(no-)?sanitize-blacklist flag

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

11 years agoclang-format: Improve formatting of builder-type calls.
Daniel Jasper [Wed, 7 Aug 2013 05:34:02 +0000 (05:34 +0000)]
clang-format: Improve formatting of builder-type calls.

This removes a formatting choice that was added at one point, but is
not generally liked by users. Specifically, in builder-type calls, do
(easily) break if the object before the ./-> is either a field or a
parameter-less function call. I.e., don't break after "aa.aa.aa" or
"aa.aa.aa()". In general, these sequences in builder-type calls are
seen as a single entity and thus breaking them up is a bad idea.

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

11 years agoclang-cl: Use .obj as object file extension instead of .o
Hans Wennborg [Wed, 7 Aug 2013 00:32:15 +0000 (00:32 +0000)]
clang-cl: Use .obj as object file extension instead of .o

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

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

11 years agoPatch to fix doxygen trailing comments for ObjectiveC properties.
Fariborz Jahanian [Tue, 6 Aug 2013 23:29:00 +0000 (23:29 +0000)]
Patch to fix doxygen trailing comments for ObjectiveC properties.
// rdar://14258334

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

11 years agoclang-cl: Implement support for the /Fo option
Hans Wennborg [Tue, 6 Aug 2013 22:11:28 +0000 (22:11 +0000)]
clang-cl: Implement support for the /Fo option

This implements support for the /Fo option, which is used
to set the filename or output dir for object files.

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

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

11 years agoAdd a new warning to -Wloop-analysis to detect suspicious increments or
Richard Trieu [Tue, 6 Aug 2013 21:31:54 +0000 (21:31 +0000)]
Add a new warning to -Wloop-analysis to detect suspicious increments or
decrements inside for loops.  Idea for this warning proposed in PR15636:

http://llvm.org/bugs/show_bug.cgi?id=15636

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

11 years agoObjectiveC migration: tweak setting of lifetime attribute
Fariborz Jahanian [Tue, 6 Aug 2013 18:06:23 +0000 (18:06 +0000)]
ObjectiveC migration: tweak setting of lifetime attribute
on @property migration. Don't set unsafe_unretained
on non-object properties. Set 'retain' on strong
properties. Makecertain properties with specific
names unsafe_unretained as well.

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

11 years agoUpdate status of support for variable templates on website.
Larisse Voufo [Tue, 6 Aug 2013 07:37:09 +0000 (07:37 +0000)]
Update status of support for variable templates on website.

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

11 years agoA bit of clean up based on peer's feedback...
Larisse Voufo [Tue, 6 Aug 2013 07:33:00 +0000 (07:33 +0000)]
A bit of clean up based on peer's feedback...

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

11 years agoPR16755: When initializing or modifying a bitfield member in a constant
Richard Smith [Tue, 6 Aug 2013 07:09:20 +0000 (07:09 +0000)]
PR16755: When initializing or modifying a bitfield member in a constant
expression, truncate the stored value to the size of the bitfield.

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

11 years agoRemoved hack that was used to properly restore the nested name specifier of qualified...
Larisse Voufo [Tue, 6 Aug 2013 05:49:26 +0000 (05:49 +0000)]
Removed hack that was used to properly restore the nested name specifier of qualified variable template ids. It turns out that the current implementation was just not logical setup for it. This commit has made it so.

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

11 years agoFixing commit r187768: Moved diagnosis of forward declarations of variable templates...
Larisse Voufo [Tue, 6 Aug 2013 03:57:41 +0000 (03:57 +0000)]
Fixing commit r187768: Moved diagnosis of forward declarations of variable templates from Parser to Sema.

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

11 years agoFix for PR16570: when comparing two function pointers, discard qualifiers when
Richard Trieu [Tue, 6 Aug 2013 03:44:10 +0000 (03:44 +0000)]
Fix for PR16570: when comparing two function pointers, discard qualifiers when
comparing non-reference function parameters.  The qualifiers don't matter for
comparisons.

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

11 years agoMoved diagnosis of forward declarations of variable templates from Parser to Sema.
Larisse Voufo [Tue, 6 Aug 2013 03:43:07 +0000 (03:43 +0000)]
Moved diagnosis of forward declarations of variable templates from Parser to Sema.

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

11 years agoclang/test/Driver/crash-report.c: Mark it as XFAIL:mingw32, for now. Investigating.
NAKAMURA Takumi [Tue, 6 Aug 2013 03:31:55 +0000 (03:31 +0000)]
clang/test/Driver/crash-report.c: Mark it as XFAIL:mingw32, for now. Investigating.

I met a message, "fatal error: file 'nul' modified since it was first processed".

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

11 years agoAST/DeclTemplate.h: Possibly fix a warning. [-Wuninitialized]
NAKAMURA Takumi [Tue, 6 Aug 2013 03:29:01 +0000 (03:29 +0000)]
AST/DeclTemplate.h: Possibly fix a warning. [-Wuninitialized]

FIXME: Would '0' be an appropriate value in SequenceNumber?

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

11 years agoSemaTemplateInstantiateDecl.cpp: Suppress a warning. [-Wunused-variable]
NAKAMURA Takumi [Tue, 6 Aug 2013 03:28:54 +0000 (03:28 +0000)]
SemaTemplateInstantiateDecl.cpp: Suppress a warning. [-Wunused-variable]

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

11 years agoStarted implementing variable templates. Top level declarations should be fully suppo...
Larisse Voufo [Tue, 6 Aug 2013 01:03:05 +0000 (01:03 +0000)]
Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...

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

11 years agoclang-cl: Implement the /Tc, /TC, /Tp and /TP options.
Hans Wennborg [Tue, 6 Aug 2013 00:20:31 +0000 (00:20 +0000)]
clang-cl: Implement the /Tc, /TC, /Tp and /TP options.

These are used to specify source files, and whether to treat source
files as C or C++.

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

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

11 years ago[ms-cxxabi] Properly mangle member pointers
David Majnemer [Mon, 5 Aug 2013 22:43:06 +0000 (22:43 +0000)]
[ms-cxxabi] Properly mangle member pointers

There were three things missing from the original implementation:

- We would omit the 'E' qualifier for members int 64-bit mode.
- We would not exmaine the qualifiers in 'IsMember' mode.
- We didn't generate the correct backref to the base class.

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

11 years ago[ms-cxxabi] Handle template-template arguments
David Majnemer [Mon, 5 Aug 2013 22:26:46 +0000 (22:26 +0000)]
[ms-cxxabi] Handle template-template arguments

Template-template arguments appear to be a rather simple encoding of the
template's templated tag type.

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

11 years ago[ms-cxxabi] Mangle nullptr template arguments
David Majnemer [Mon, 5 Aug 2013 21:33:59 +0000 (21:33 +0000)]
[ms-cxxabi] Mangle nullptr template arguments

MSVC mangles nullptr template arguments identically to zero literals.

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

11 years agoAdd option to disable module loading.
Daniel Jasper [Mon, 5 Aug 2013 20:26:17 +0000 (20:26 +0000)]
Add option to disable module loading.

This patch was created by Lawrence Crowl and reviewed in:
http://llvm-reviews.chandlerc.com/D963

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

11 years agolit.cfg: better check for MSYS
Hans Wennborg [Mon, 5 Aug 2013 20:14:43 +0000 (20:14 +0000)]
lit.cfg: better check for MSYS

When running the tests under Cygwin using non-Cygwin python,
the platform would be Windows and there would be bash on the path,
so this check for MSYS would not work correctly.

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

11 years agoImplement C++'s restrictions on the type of an expression passed to a vararg
Richard Smith [Mon, 5 Aug 2013 18:49:43 +0000 (18:49 +0000)]
Implement C++'s restrictions on the type of an expression passed to a vararg
function: it can't be 'void' and it can't be an initializer list. We give a
hard error for these rather than treating them as undefined behavior (we can
and probably should do the same for non-POD types in C++11, but as of this
change we don't).

Slightly rework the checking of variadic arguments in a function with a format
attribute to ensure that certain kinds of format string problem (non-literal
string, too many/too few arguments, ...) don't suppress this error.

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

11 years agoRegression test for PR12699
Serge Pavlov [Mon, 5 Aug 2013 18:38:16 +0000 (18:38 +0000)]
Regression test for PR12699

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

11 years ago[analyzer] Clarify that r187624 is a hack and should be fixed better later.
Jordan Rose [Mon, 5 Aug 2013 16:02:02 +0000 (16:02 +0000)]
[analyzer] Clarify that r187624 is a hack and should be fixed better later.

Tracked by <rdar://problem/14648821>.

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

11 years agoUse a shuffle with undef elements instead of inserting 0s in the 128-bit to 256-bit...
Craig Topper [Mon, 5 Aug 2013 06:17:21 +0000 (06:17 +0000)]
Use a shuffle with undef elements instead of inserting 0s in the 128-bit to 256-bit casting intrinsics to improve performance. Thanks to Katya Romanova for identifying this issue.

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

11 years agoSema: Don't assume a nested name specifier holds a type
David Majnemer [Mon, 5 Aug 2013 04:53:41 +0000 (04:53 +0000)]
Sema: Don't assume a nested name specifier holds a type

Sema::PerformObjectMemberConversion assumed that the Qualifier it was
given holds a type. However, the specifier could hold just a namespace.
In this case, we should ignore the qualifier and not attempt to cast to
it.

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

11 years agoEmit the constructor for abstract classes when using -cxx-abi microsoft, fixes PR16735
Timur Iskhodzhanov [Sun, 4 Aug 2013 17:30:04 +0000 (17:30 +0000)]
Emit the constructor for abstract classes when using -cxx-abi microsoft, fixes PR16735

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

11 years agoAdd support for passing -1 to __builtin_shufflevector to signify an undefined element...
Craig Topper [Sat, 3 Aug 2013 17:40:38 +0000 (17:40 +0000)]
Add support for passing -1 to __builtin_shufflevector to signify an undefined element value to match IR capabilities.

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

11 years agoOptions.td: remove _DASH_DASH
Hans Wennborg [Fri, 2 Aug 2013 23:21:32 +0000 (23:21 +0000)]
Options.td: remove _DASH_DASH

Since LLVM r187675, this is handled by the option parsing code itself.

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

11 years agoObjectiveC migrator. Differentiate 'instancetype'
Fariborz Jahanian [Fri, 2 Aug 2013 22:34:18 +0000 (22:34 +0000)]
ObjectiveC migrator. Differentiate 'instancetype'
from 'id' result type when deciding on migration
to instancetype.

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

11 years agoOnly use the Darwin linker's -export_dynamic option with supported versions.
Bob Wilson [Fri, 2 Aug 2013 22:25:34 +0000 (22:25 +0000)]
Only use the Darwin linker's -export_dynamic option with supported versions.

Related to <rdar://problem/14578094>.

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

11 years agoRe-commit r187637: "clang-cl: add more options"
Hans Wennborg [Fri, 2 Aug 2013 22:24:50 +0000 (22:24 +0000)]
Re-commit r187637: "clang-cl: add more options"

> This adds a bunch of options to clang-cl. Notably, this includes
> all the options that get passed when doing a default build of a
> command-line project with msbuild.exe in Debug and Release modes,
> and I believe all flags from Reid's original patch.

The original commit was reverted in r187640 after it broke the Mac build.

This should now be fixed, by Clang r187668, LLVM r187675, and putting
a -- before %s in the test.

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

11 years agoImplement Allman style.
Manuel Klimek [Fri, 2 Aug 2013 21:31:59 +0000 (21:31 +0000)]
Implement Allman style.

Patch by Frank Miller.

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

11 years agoFix crash when encountering alias templates in isDerivedFrom matches.
Manuel Klimek [Fri, 2 Aug 2013 21:24:09 +0000 (21:24 +0000)]
Fix crash when encountering alias templates in isDerivedFrom matches.

- pull out function to drill to the CXXRecordDecl from the type,
  to allow recursive resolution
- make the analysis more robust by rather skipping values we don't
  understand

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

11 years agoObjectiveC migrator: Add another family of factory
Fariborz Jahanian [Fri, 2 Aug 2013 20:54:18 +0000 (20:54 +0000)]
ObjectiveC migrator: Add another family of factory
methods which can be migrated to instancetype.

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

11 years agoFix missing * making the C++ mode thing not work
Matt Arsenault [Fri, 2 Aug 2013 20:43:37 +0000 (20:43 +0000)]
Fix missing * making the C++ mode thing not work

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

11 years agoCC1: Only parse command-line options that have the CC1Option flag.
Hans Wennborg [Fri, 2 Aug 2013 20:16:22 +0000 (20:16 +0000)]
CC1: Only parse command-line options that have the CC1Option flag.

We already reject flags that don't have the CC1Option flag,
but we would previously do so after parsing the command-line
arguments.

Since the option parser now has a parameter for excluding options,
we should just use that instead.

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

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

11 years agoObjectiveC migrator: Fixes public buildbot failures,
Fariborz Jahanian [Fri, 2 Aug 2013 18:00:53 +0000 (18:00 +0000)]
ObjectiveC migrator: Fixes public buildbot failures,
in my previous patch which was reverted in r187657

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

11 years agorevert patch I added in r187655. It still breaks public
Fariborz Jahanian [Fri, 2 Aug 2013 16:25:41 +0000 (16:25 +0000)]
revert patch I added in r187655. It still breaks public
buildbot.

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

11 years agoObjectiveC migration. Check-in patch reverted in r187634.
Fariborz Jahanian [Fri, 2 Aug 2013 16:00:08 +0000 (16:00 +0000)]
ObjectiveC migration. Check-in patch reverted in r187634.
Also removed check for "NS" prefix for class name.

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

11 years agoConvert last use of st_dev in clang.
Rafael Espindola [Fri, 2 Aug 2013 15:31:35 +0000 (15:31 +0000)]
Convert last use of st_dev in clang.

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

11 years agoRemove rather oddly merged logic from AArch64 commit.
Tim Northover [Fri, 2 Aug 2013 11:38:46 +0000 (11:38 +0000)]
Remove rather oddly merged logic from AArch64 commit.

We seem to have ended up with both an inlined check of permitted NEON base
types and a call to a function.

Since the outer if was (I believe) strictly weaker than the one in the
function, there's no actual user-visible behaviour change, so no tests.

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

11 years agoclang-format: Fix string breaking after "<<".
Daniel Jasper [Fri, 2 Aug 2013 11:01:15 +0000 (11:01 +0000)]
clang-format: Fix string breaking after "<<".

Before, clang-format would not break overly long string literals
following a "<<" with FormatStyle::AlwaysBreakBeforeMultilineStrings
being set.

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

11 years agoAssume UniqueID is zero for invalid PPRegion to fix uninitialized reads reported...
Alexey Samsonov [Fri, 2 Aug 2013 09:06:39 +0000 (09:06 +0000)]
Assume UniqueID is zero for invalid PPRegion to fix uninitialized reads reported by MSan

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

11 years agoFix indentation. No functional change.
Craig Topper [Fri, 2 Aug 2013 05:10:31 +0000 (05:10 +0000)]
Fix indentation. No functional change.

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

11 years agoRevert r187537 "clang-cl: add more options"
Hans Wennborg [Fri, 2 Aug 2013 01:29:28 +0000 (01:29 +0000)]
Revert r187537 "clang-cl: add more options"

It broke the "phase1 - sanity" buildbot. Reverting until
we can figure out what's going on.

And Eric says it broke all current Mac builds actually.

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

11 years agoWhen merging redeclaration chains across modules, if a declaration is visible
Richard Smith [Fri, 2 Aug 2013 01:09:12 +0000 (01:09 +0000)]
When merging redeclaration chains across modules, if a declaration is visible
in one module but is only declared as a friend in another module, keep it
visible in the result of the merge.

This is incomplete on two axes:

1) Our handling of local extern declarations is basically broken (we put them
in the wrong decl context, and don't find them in redeclaration lookup, unless
they've previously been declared), and this results in them making friends
visible after a merge.

2) Eventually we'll need to mark that this has happened, and more carefully
check whether a declaration should be visible if it was only visible in some
of the modules in which it was declared. Fortunately it's rare for the
identifier namespace of a declaration to change along its redeclaration chain.

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

11 years agoclang-cl: add more options
Hans Wennborg [Fri, 2 Aug 2013 00:30:15 +0000 (00:30 +0000)]
clang-cl: add more options

This adds a bunch of options to clang-cl. Notably, this includes
all the options that get passed when doing a default build of a
command-line project with msbuild.exe in Debug and Release modes,
and I believe all flags from Reid's original patch.

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

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

11 years agoRevert "ObjectiveC migrator. Migrate to instancetype return type for mehods with...
Rafael Espindola [Fri, 2 Aug 2013 00:01:14 +0000 (00:01 +0000)]
Revert "ObjectiveC migrator. Migrate to instancetype return type for mehods with certain prefix selector matching their class names' suffix."

This reverts commit r187626.

It is breaking the bots.

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

11 years agoRevert "If -fslp-vectorize or -fno-slp-vectorize are given, honor this selection...
Rafael Espindola [Thu, 1 Aug 2013 23:56:42 +0000 (23:56 +0000)]
Revert "If -fslp-vectorize or -fno-slp-vectorize are given, honor this selection. If no flag is given, enable it for -O3."

This reverts commit r187630.

Looks like it is breaking the bots.

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

11 years agoclang-format: Operator precendence in ObjC method exprs.
Daniel Jasper [Thu, 1 Aug 2013 23:13:03 +0000 (23:13 +0000)]
clang-format: Operator precendence in ObjC method exprs.

Patch (mostly) by Adam Strzelecki. Thanks!

Before:
  [self aaaaaa:bbbbbbbbbbbbb
      aaaaaaaaaa:bbbbbbbbbbbbbbbbb
           aaaaa:bbbbbbbbbbb +
      bbbbbbbbbbbb aaaa:bbb];

After:
  [self aaaaaa:bbbbbbbbbbbbb
      aaaaaaaaaa:bbbbbbbbbbbbbbbbb
           aaaaa:bbbbbbbbbbb + bbbbbbbbbbbb
            aaaa:bbb];

This fixes llvm.org/PR16150.

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

11 years agoIf -fslp-vectorize or -fno-slp-vectorize are given, honor this selection. If no flag...
Nadav Rotem [Thu, 1 Aug 2013 22:56:53 +0000 (22:56 +0000)]
If -fslp-vectorize or -fno-slp-vectorize are given, honor this selection. If no flag is given, enable it for -O3.

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

11 years agoObjectiveC migrator. Migrate to instancetype return type
Fariborz Jahanian [Thu, 1 Aug 2013 22:29:32 +0000 (22:29 +0000)]
ObjectiveC migrator. Migrate to instancetype return type
for mehods with certain prefix selector matching their class names'
suffix.

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

11 years ago[analyzer] Don't process autorelease counts in synthesized function bodies.
Jordan Rose [Thu, 1 Aug 2013 22:16:36 +0000 (22:16 +0000)]
[analyzer] Don't process autorelease counts in synthesized function bodies.

We process autorelease counts when we exit functions, but if there's an
issue in a synthesized body the report will get dropped. Just skip the
processing for now and let it get handled when the caller gets around to
processing autoreleases.

(This is still suboptimal: objects autoreleased in the caller context
should never be warned about when exiting a callee context, synthesized
or not.)

Second half of <rdar://problem/14611722>

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

11 years ago[analyzer] Silently drop all reports within synthesized bodies.
Jordan Rose [Thu, 1 Aug 2013 22:16:30 +0000 (22:16 +0000)]
[analyzer] Silently drop all reports within synthesized bodies.

Much of our diagnostic machinery is set up to assume that the report
end path location is valid. Moreover, the user may be quite confused
when something goes wrong in our BodyFarm-synthesized function bodies,
which may be simplified or modified from the real implementations.
Rather than try to make this all work somehow, just drop the report so
that we don't try to go on with an invalid source location.

Note that we still handle reports whose /paths/ go through invalid
locations, just not those that are reported in one.

We do have to be careful not to lose warnings because of this.
The impetus for this change was an autorelease being processed within
the synthesized body, and there may be other possible issues that are
worth reporting in some way. We'll take these as they come, however.

<rdar://problem/14611722>

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

11 years agoclang-format: Don't break empty 2nd operand of ternary expr.
Daniel Jasper [Thu, 1 Aug 2013 22:05:00 +0000 (22:05 +0000)]
clang-format: Don't break empty 2nd operand of ternary expr.

Before:
  some_quite_long_variable_name_ptr
      ?
      : argv[9] ? ptr : argv[8] ? : argv[7] ? ptr : argv[6];
After:
  some_quite_long_variable_name_ptr
      ?: argv[9] ? ptr : argv[8] ?: argv[7] ? ptr : argv[6];

Patch by Adam Strzelecki, thank you!!

This fixed llvm.org/PR16758.

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

11 years agoUse llvm::sys::fs::UniqueID for windows and unix.
Rafael Espindola [Thu, 1 Aug 2013 21:42:11 +0000 (21:42 +0000)]
Use llvm::sys::fs::UniqueID for windows and unix.

This unifies the unix and windows versions of FileManager::UniqueDirContainer
and FileManager::UniqueFileContainer by using UniqueID.

We cannot just replace "struct stat" with llvm::sys::fs::file_status, since we
want to be able to construct fake ones, and file_status has different members
on unix and windows.

What the patch does is:

* Record only the information that clang is actually using.
* Use llvm::sys::fs::status instead of stat and fstat.
* Use llvm::sys::fs::UniqueID
* Delete the old windows versions of UniqueDirContainer and
UniqueFileContainer since the "unix" one now works on windows too.

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

11 years agoUse function attributes to indicate if we don't want to realign the stack.
Bill Wendling [Thu, 1 Aug 2013 21:41:02 +0000 (21:41 +0000)]
Use function attributes to indicate if we don't want to realign the stack.

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

11 years agoDebugInfo: Don't prefer declarations over definitions in -flimit-debug-info in C
David Blaikie [Thu, 1 Aug 2013 20:57:40 +0000 (20:57 +0000)]
DebugInfo: Don't prefer declarations over definitions in -flimit-debug-info in C

Without an ODR, the -flimit-debug-info debug info size optimization of
emitting declarations for fully defined types when only a declaration is
needed by the TU, is incorrect. Emit the full definition whenever it's
available in non-C++.

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

11 years agoDebugInfo: Emit template arguments for limited types used for context.
David Blaikie [Thu, 1 Aug 2013 20:31:40 +0000 (20:31 +0000)]
DebugInfo: Emit template arguments for limited types used for context.

We emit definitions with no members when a nested type is
referenced/required (GCC does the same, to be fair) but failed to attach
the template arguments in such a case.

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

11 years agoOptions.td: O0 and O4 are not Joined options
Hans Wennborg [Thu, 1 Aug 2013 19:46:33 +0000 (19:46 +0000)]
Options.td: O0 and O4 are not Joined options

(I'm not sure how to test this because the Driver will still accept
 e.g. "-O4foo", but it goes in the catch-all -O option instead of -O4.)

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

11 years agoEnable the SLP-vectorizer by default
Nadav Rotem [Thu, 1 Aug 2013 18:28:23 +0000 (18:28 +0000)]
Enable the SLP-vectorizer by default

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

11 years agoReduce a variable's scope (no functionality change)
David Blaikie [Thu, 1 Aug 2013 18:23:24 +0000 (18:23 +0000)]
Reduce a variable's scope (no functionality change)

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

11 years agoSimplify git-clang-format by using new -lines option.
Daniel Jasper [Thu, 1 Aug 2013 18:17:13 +0000 (18:17 +0000)]
Simplify git-clang-format by using new -lines option.

Patch by Mark Lodato. Thank you!

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

11 years agoTeach clang-format to understand static_asserts better.
Daniel Jasper [Thu, 1 Aug 2013 17:58:23 +0000 (17:58 +0000)]
Teach clang-format to understand static_asserts better.

Before:
  template <bool B, bool C>
  class A {
    static_assert(B &&C, "Something is wrong");
  };

After:
  template <bool B, bool C>
  class A {
    static_assert(B && C, "Something is wrong");
  };

(Note the spacing around '&&'). Also change the identifier table to always
understand all C++11 keywords (which seems like the right thing to do).

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

11 years agoFix typo in comment.
Joey Gouly [Thu, 1 Aug 2013 17:54:08 +0000 (17:54 +0000)]
Fix typo in comment.

Thanks Artyom Skrobov!

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

11 years agoAST: Treat inline function declarations in -fms-compatibility as if it were in C...
David Majnemer [Thu, 1 Aug 2013 17:26:42 +0000 (17:26 +0000)]
AST: Treat inline function declarations in -fms-compatibility as if it were in C++ when in C mode

This essentially fixes PR16766.

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

11 years agoOptions: Use AliasArgs for -O -> -O2 translation.
Hans Wennborg [Thu, 1 Aug 2013 16:21:57 +0000 (16:21 +0000)]
Options: Use AliasArgs for -O -> -O2 translation.

This way we can do the translation in the .td file rather than manually.

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

11 years agoclang-format: Improve line breaks in @property.
Daniel Jasper [Thu, 1 Aug 2013 13:46:58 +0000 (13:46 +0000)]
clang-format: Improve line breaks in @property.

Before:
  @property(nonatomic, assign,
            readonly) NSString *looooooooooooooooooooooooooooongName;

After:
  @property(nonatomic, assign, readonly)
      NSString *looooooooooooooooooooooooooooongName;

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

11 years agoMake helper function static.
Benjamin Kramer [Thu, 1 Aug 2013 11:08:06 +0000 (11:08 +0000)]
Make helper function static.

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

11 years agoSilence unused variable warning in non-assert builds.
Daniel Jasper [Thu, 1 Aug 2013 10:30:11 +0000 (10:30 +0000)]
Silence unused variable warning in non-assert builds.

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

11 years agoAArch64: initial NEON support
Tim Northover [Thu, 1 Aug 2013 09:23:19 +0000 (09:23 +0000)]
AArch64: initial NEON support

Patch by Ana Pazos

- Completed implementation of instruction formats:
AdvSIMD three same
AdvSIMD modified immediate
AdvSIMD scalar pairwise

- Completed implementation of instruction classes
(some of the instructions in these classes
belong to yet unfinished instruction formats):
Vector Arithmetic
Vector Immediate
Vector Pairwise Arithmetic

- Initial implementation of instruction formats:
AdvSIMD scalar two-reg misc
AdvSIMD scalar three same

- Intial implementation of instruction class:
Scalar Arithmetic

- Initial clang changes to support arm v8 intrinsics.
Note: no clang changes for scalar intrinsics function name mangling yet.

- Comprehensive test cases for added instructions
To verify auto codegen, encoding, decoding, diagnosis, intrinsics.

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

11 years agoCheck dynamic_cast is not used with -fno-rtti, unless it is a noop or can be resolved...
Arnaud A. de Grandmaison [Thu, 1 Aug 2013 08:28:32 +0000 (08:28 +0000)]
Check dynamic_cast is not used with -fno-rtti, unless it is a noop or can be resolved statically.

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

11 years agoRemove more odd code that tries to account for an off by 1 problem in vec3 shuffles...
Craig Topper [Thu, 1 Aug 2013 06:59:29 +0000 (06:59 +0000)]
Remove more odd code that tries to account for an off by 1 problem in vec3 shuffles that doesn't really exist.

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

11 years agoFix to handle all non-power-of-2 vector sizes in the mask form of _builtin_shuffle_ve...
Craig Topper [Thu, 1 Aug 2013 06:42:40 +0000 (06:42 +0000)]
Fix to handle all non-power-of-2 vector sizes in the mask form of _builtin_shuffle_vector.

Previously a 2-bit mask was used to mask each element of a vec6 mask before doing the extracts instead of 3-bit mask necessary to cover 0-5. vec3 was the only non-power-of-2 that worked correctly because a +1 conditionally added before calculating floor(log2(elements)).

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

11 years agoSema: Diagnose explicitly bound unresolved member expressions decaying into pointers...
David Majnemer [Thu, 1 Aug 2013 06:13:59 +0000 (06:13 +0000)]
Sema: Diagnose explicitly bound unresolved member expressions decaying into pointers to function type

We would disallow the case where the overloaded member expression is
coming from an address-of operator but we wouldn't issue any diagnostics
when the overloaded member expression comes by way of a function to
pointer decay cast.

Clang's implementation of DR61 is now seemingly complete.

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

11 years agoRemove broken and unnecessary vec3 handling from VisitShuffleVectorExpr.
Craig Topper [Thu, 1 Aug 2013 04:51:48 +0000 (04:51 +0000)]
Remove broken and unnecessary vec3 handling from VisitShuffleVectorExpr.

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

11 years agoParse: Don't consider attributes of broken member declarators
David Majnemer [Thu, 1 Aug 2013 04:22:55 +0000 (04:22 +0000)]
Parse: Don't consider attributes of broken member declarators

ParseCXXClassMemberDeclaration was trying to use the result of
ActOnCXXMemberDeclarator to attach it to some late parsed attributes.

However when failures arise, we have no decl to attach to which
eventually leads us to a NULL pointer dereference.

While we are here, clean up the code a bit.

Fixes PR16765

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