Rafael Espindola [Sat, 19 Oct 2013 01:37:17 +0000 (01:37 +0000)]
Simplify FunctionDecl::getBody.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193025
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 19 Oct 2013 00:27:23 +0000 (00:27 +0000)]
When building ubsan, link in ubsan parts first and sanitizer-common second, to
pick up the common bits ubsan actually needs. Also remove whole-archive when we
aren't trying to re-export the symbols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193022
91177308-0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Sat, 19 Oct 2013 00:05:00 +0000 (00:05 +0000)]
Allow CorrectTypo to replace CXXScopeSpecifiers that refer to classes.
Now that CorrectTypo knows how to correctly search classes for typo
correction candidates, there is no good reason to only replace an
existing CXXScopeSpecifier if it refers to a namespace. While the actual
enablement was a matter of changing a single comparison, the fallout
from enabling the functionality required a lot more code changes
(including my two previous commits).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193020
91177308-0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Sat, 19 Oct 2013 00:04:52 +0000 (00:04 +0000)]
Be smarter about deciding to add a leading '::' to a
NestedNameSpecifier that replaces an existing specifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193019
91177308-0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Sat, 19 Oct 2013 00:04:49 +0000 (00:04 +0000)]
Merge NamespaceSpecifierSet's AddNamespace and AddRecord as they are
essentially the same.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193018
91177308-0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Fri, 18 Oct 2013 23:11:49 +0000 (23:11 +0000)]
Consumed analysis: fix assert failure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193010
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 18 Oct 2013 22:49:04 +0000 (22:49 +0000)]
clang-cl: diagnose setting asm listing filename with multiple inputs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193006
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 18 Oct 2013 22:48:20 +0000 (22:48 +0000)]
Fix crash if a submodule @imports another submodule from the same module. The
test also adds FIXMEs for a number of places where imports and includes of
submodules don't work very well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193005
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 18 Oct 2013 21:20:34 +0000 (21:20 +0000)]
ObjectiveC. Added support for methods annotated with format_arg
attributes when such methods are actually envoked in message
expression. // rdar://
15242010
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193003
91177308-0d34-0410-b5e6-
96231b3b80d8
Ariel J. Bernal [Fri, 18 Oct 2013 19:48:31 +0000 (19:48 +0000)]
Reverted r192992 broke windows and freebsd builds.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192997
91177308-0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Fri, 18 Oct 2013 19:25:18 +0000 (19:25 +0000)]
Consumed analysis: assume that non-const reference parameters are initially
in the "uknown" state. Patch by chris.wailes@gmail.com. Reviewed by delesley.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192995
91177308-0d34-0410-b5e6-
96231b3b80d8
Ariel J. Bernal [Fri, 18 Oct 2013 18:38:24 +0000 (18:38 +0000)]
This patch fixes replacements that are not applied when relative paths are
specified.
In particular it makes sure that relative paths for non-virtual files aren't
made absolute.
Added unittest.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192992
91177308-0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Fri, 18 Oct 2013 18:36:21 +0000 (18:36 +0000)]
Consumed analysis: All the return_typestate parameter to be attached to the
default constructor. Patch by chris.wailes@gmail.com, reviewed by delesley.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192991
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 18 Oct 2013 17:20:57 +0000 (17:20 +0000)]
clang-format: Be more aggressive on incorrect code.
Before, clang-format would not adjust leading indents if it found a
structural error (e.g. unmatched {}). It seems, however, that
clang-format has gotten good enough at parsing the code structure that
this hurts in almost all cases. Commonly, while writing code, it is
very useful to be able to correclty indent incomplete if statements or
for loops.
In case this leads to errors that we don't anticipate, we need to find
out and fix those.
This fixed llvm.org/PR17594.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192988
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 18 Oct 2013 16:47:55 +0000 (16:47 +0000)]
clang-format: Don't force linebreak between return and multiline string.
This looks ugly and leads to llvm.org/PR17590.
Before (with AlwaysBreakBeforeMultilineStrings):
return
"aaaa"
"bbbb";
After:
return "aaaa"
"bbbb";
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192984
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 18 Oct 2013 16:34:40 +0000 (16:34 +0000)]
Make clang-format slightly more willing to break before trailing annotations.
Specifically, prefer breaking before trailing annotations over breaking
before the first parameter.
Before:
void
ffffffffffffffffffffffff(
int
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
int
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) OVERRIDE;
After:
void
ffffffffffffffffffffffff(int
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
int
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
OVERRIDE;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192983
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 18 Oct 2013 15:48:58 +0000 (15:48 +0000)]
Add another MinGW header include path
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192982
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 18 Oct 2013 15:23:06 +0000 (15:23 +0000)]
clang-format: Improve formatting of templated builder-type calls.
Before:
aaaaaaaaaaaaaaaaaaaaaaaaaaa.
aaaaaaaaaaaaaaaaaa().
aaaaaaaaaaaaaaaaa().has<
bbbbbbbbbbbbbbbbbbbbb>();
After:
aaaaaaaaaaaaaaaaaaaaaaaaaaa.
aaaaaaaaaaaaa()
.
aaaaaaaaaaaaaaaaaaaaaaaaaa()
.has<
bbbbbbbbbbbbbbbbbbbbb>();
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192981
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 18 Oct 2013 14:03:36 +0000 (14:03 +0000)]
[AArch64] Add support for NEON scalar extract narrow instructions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192971
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Fri, 18 Oct 2013 13:13:53 +0000 (13:13 +0000)]
[Mips] Define __mips_fpr and _MIPS_FPSET macros.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192969
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 18 Oct 2013 10:38:14 +0000 (10:38 +0000)]
clang-format: Make continuation indent width configurable.
Patch by Kim Gräsman. Thank you!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192964
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 18 Oct 2013 06:54:39 +0000 (06:54 +0000)]
C++ modules: don't lose track of a 'namespace std' that is imported from a module.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192951
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 18 Oct 2013 06:05:18 +0000 (06:05 +0000)]
Basic ODR checking for C++ modules:
If we have multiple definitions of the same entity from different modules, we
nominate the first definition which we see as being the canonical definition.
If we load a declaration from a different definition and we can't find a
corresponding declaration in the canonical definition, issue a diagnostic.
This is insufficient to prevent things from going horribly wrong in all cases
-- we might be in the middle of emitting IR for a function when we trigger some
deserialization and discover that it refers to an incoherent piece of the AST,
by which point it's probably too late to bail out -- but we'll at least produce
a diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192950
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Fri, 18 Oct 2013 05:54:24 +0000 (05:54 +0000)]
Check "late parsed" friend functions for redefinition
r177003 applied the late parsed template technique to friend functions
but omitted the corresponding check for redefinitions.
This patch adds the same check already in use for templates to the
new code path in order to diagnose and reject invalid redefinitions
that were being silently accepted.
Fixes PR17324.
Reviewed by Richard Smith.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192948
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Fri, 18 Oct 2013 05:54:19 +0000 (05:54 +0000)]
Fix missed exception spec checks and crashes
Delayed exception specification checking for defaulted members and virtual
destructors are both susceptible to mutation during iteration so we need to
swap and process the worklists.
This resolves both accepts-invalid and rejects-valid issues and moreover fixes
potential invalid memory access as the contents of the vectors change during
iteration and recursive template instantiation.
Checking can be further delayed where parent classes aren't yet fully defined.
This patch adds two assertions at end of TU to ensure no specs are left
unchecked as was happenning before the fix, plus a test case from Marshall Clow
for the defaulted member crash extracted from the libcxx headers.
Reviewed by Richard Smith.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192947
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 18 Oct 2013 05:00:41 +0000 (05:00 +0000)]
False. GCC does not accept [[gnu::warn_unused]], not to be confused with [[gnu::warn_unused_result]] which does exist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192946
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 18 Oct 2013 01:34:56 +0000 (01:34 +0000)]
Fix 80-column violation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192937
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 18 Oct 2013 00:33:31 +0000 (00:33 +0000)]
[-fms-extensions] Permit 'override' in C++98 and 'sealed' as a synonym for 'final'
Summary: Some MS headers use these features.
Reviewers: rnk, rsmith
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1948
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192936
91177308-0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Thu, 17 Oct 2013 23:23:53 +0000 (23:23 +0000)]
Consumed analysis: Add param_typestate attribute, which specifies that
function parameters must be in a particular state. Patch by
chris.wailes@gmail.com. Reviewed by delesley@google.com.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192934
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 17 Oct 2013 23:13:13 +0000 (23:13 +0000)]
ObjectiveC migrator. Minor clean up of my last patch.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192933
91177308-0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Thu, 17 Oct 2013 22:53:04 +0000 (22:53 +0000)]
Consumed Analysis: Allow parameters that are passed by non-const reference
to be treated as return values, and marked with the "returned_typestate"
attribute. Patch by chris.wailes@gmail.com; reviewed by delesley@google.com.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192932
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 17 Oct 2013 22:23:32 +0000 (22:23 +0000)]
ObjectiveC migrator. In infering NS_ENUM/NS_OPTIONS
macros, prefer the typedef immediately following the
enum declaration to the one preceeding it.
// rdar://
15200915
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192927
91177308-0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Thu, 17 Oct 2013 22:21:03 +0000 (22:21 +0000)]
Consumed analysis: update to previous test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192926
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 17 Oct 2013 21:30:27 +0000 (21:30 +0000)]
[ms-cxxabi] Error out on virtual function memptrs
These are uncommon and this is better than miscompiling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192923
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Thu, 17 Oct 2013 21:00:19 +0000 (21:00 +0000)]
Revert "Fix missed exception spec checks and crashes"
The changes caused the sanitizer bot to hang:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/2311
Needs investigation.
This reverts commit r192914.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192921
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 17 Oct 2013 20:41:18 +0000 (20:41 +0000)]
Make .asm a valid extension for assembly files
This is a common extension on Windows, and now clang will assemble them
instead of treating them as linker input which is the default for unknown
file types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192919
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Thu, 17 Oct 2013 19:12:03 +0000 (19:12 +0000)]
Fix missed exception spec checks and crashes
Delayed exception specification checking for defaulted members and virtual
destructors are both susceptible to mutation during iteration so we need to
process the worklists fully.
This resolves both accepts-invalid and rejects-valid issues and moreover fixes
potential invalid memory access as the contents of the vectors change during
iteration and recursive template instantiation.
This patch also adds two assertions at end of TU to ensure no specs are left
unchecked as was happenning before the fix, plus a test case from Marshall Clow
for the defaulted member crash extracted from the libcxx headers.
Reviewed by Richard Smith.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192914
91177308-0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Thu, 17 Oct 2013 18:19:31 +0000 (18:19 +0000)]
Consumed analysis: fix ICE in handling of loop source locations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192911
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 17 Oct 2013 18:12:50 +0000 (18:12 +0000)]
[AArch64] Add support for NEON scalar three register different instruction
class. The instruction class includes the signed saturating doubling
multiply-add long, signed saturating doubling multiply-subtract long, and
the signed saturating doubling multiply long instructions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192909
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 17 Oct 2013 16:16:23 +0000 (16:16 +0000)]
clang-cl: Add support for asm listings (/FA and /Fa)
This adds support for outputing the assembly to a file during compilation.
It does this by changing the compilation pipeling to not use the integrated
assembler, and keep the intermediate assembler file.
Differential Revision: http://llvm-reviews.chandlerc.com/D1946
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192902
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 17 Oct 2013 15:37:26 +0000 (15:37 +0000)]
Rename some functions for consistency.
Every other function in Redeclarable.h was using Decl instead of Declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192900
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 17 Oct 2013 14:55:58 +0000 (14:55 +0000)]
[mips] Added -mfp64 and -mfp32 options.
These options specify 64-bit FP registers and 32-bit FP registers respectively.
When using -mfp32, the FPU has 16x double-precision registers overlapping with
the 32x single-precision registers (each double-precision register overlaps
two single-precision registers).
When using -mfp64, the FPU has 32x double-precision registers overlapping with
the 32x single-precision registers (each double-precision register overlaps
with one single-precision register and has an additional 32-bits).
MSA requires -mfp64.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192899
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 17 Oct 2013 14:35:42 +0000 (14:35 +0000)]
[mips][msa] Update -mmsa help text and removed the hidden flag to better match conventions used by other targets
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192898
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 17 Oct 2013 13:57:25 +0000 (13:57 +0000)]
[mips][msa] Added most of the remaining builtins
Includes:
and.v, bmnz.v, bmz.v, bnz.[bhwdv], bz.[bhwdv], cfcmsa, ctcmsa, fcaf,
fcor, fcueq, fcul[et], fcun, fcune, fsaf, fsueq, fsul[et], fsun, fsune, ftrunc
hadd_[su].[hwd], hsub_[su].[hwd], insert.[bhw], insve.[bhw], ld.[bhwd],
move.v, nor.v, or.v, srar.[bhwd], srari.[bhwd], srlr.[bhwd], srlri.[bhwd],
st.[bhwd], subsus_u.[bhwd], subsuu_s.[bhwd], vshf.[bhwd], xor.v
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192896
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 17 Oct 2013 09:55:56 +0000 (09:55 +0000)]
Remove unicode characters, trailing whitespace from test case
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192877
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Thu, 17 Oct 2013 09:11:45 +0000 (09:11 +0000)]
Follow-up to r192822: fix Clang assertion when building with -fexceptions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192875
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitry Vyukov [Thu, 17 Oct 2013 08:06:19 +0000 (08:06 +0000)]
tsan: update docs
update docs for no_sanitize_thread attribute and blacklist
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192872
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 17 Oct 2013 04:13:35 +0000 (04:13 +0000)]
This is now passing. Uncomment and close out PR6281.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192869
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 17 Oct 2013 03:28:24 +0000 (03:28 +0000)]
Add support to the Clang driver for forwarding all of gfortran's flags
to GCC when asked to compile a fortran input.
This fixes a regression with essentially every Fortran compile since we
started rejecting unknown flags. Also moves a mis-classified gfortran
flag into the nicely documented set.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192867
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 17 Oct 2013 01:31:21 +0000 (01:31 +0000)]
Add the context that a function was created in as the context for the
function, not the context of the context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192862
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 17 Oct 2013 01:29:48 +0000 (01:29 +0000)]
Add implementations of the MSVC barrier intrinsics
Summary:
These are deprecated in VS 2012 according to MSDN. They don't actually
compile down to any code. They prevent the compiler from reordering
memory accesses across the barrier, which is what a memory-clobbering
volatile asm does.
Reviewers: echristo
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1954
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192860
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 16 Oct 2013 22:35:19 +0000 (22:35 +0000)]
ObjectiveC migrator. Remove blank lines
when inferring property from setter/getter
methods. // rdar://
15200949
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192853
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 16 Oct 2013 21:26:26 +0000 (21:26 +0000)]
Rename HandleTargetFeatures->handleTargetFeatures to match
everything else in the class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192851
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 16 Oct 2013 21:19:26 +0000 (21:19 +0000)]
Add preprocessor support for powerpc vsx.
The test should be expanded upon for more powerpc checking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192849
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 16 Oct 2013 21:19:23 +0000 (21:19 +0000)]
Remove an old, seemingly out of date, comment.
The referenced script no longer seems to exist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192848
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 16 Oct 2013 21:19:19 +0000 (21:19 +0000)]
Fix comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192847
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 16 Oct 2013 21:12:00 +0000 (21:12 +0000)]
PR17592: Ensure we diagnose shadowing a template parameter with a local extern
declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192846
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 16 Oct 2013 21:04:53 +0000 (21:04 +0000)]
[AArch64] Add support for NEON scalar negate instruction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192845
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 16 Oct 2013 21:04:49 +0000 (21:04 +0000)]
[AArch64] Add support for NEON scalar absolute value instruction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192844
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 16 Oct 2013 20:44:26 +0000 (20:44 +0000)]
ObjectiveC migrator. Don't add 'assign' for
inferred properties when type is scalar and
assumed to be 'assign. // rdar://
15231241
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192841
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 16 Oct 2013 20:40:13 +0000 (20:40 +0000)]
Add minimal command line support for the VSX powerpc processor.
Preprocessor support is still needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192839
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 16 Oct 2013 20:40:08 +0000 (20:40 +0000)]
Rework ppc options handling into a features group.
This should have no functional behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192838
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 16 Oct 2013 19:48:23 +0000 (19:48 +0000)]
ObjectiveC migrator. 'atomic' is the default attribute.
Don't add it to inferred property. // rdar://
14988132
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192834
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 16 Oct 2013 19:28:50 +0000 (19:28 +0000)]
Emit a .ident saying that clang produced this file.
Patch by Katya Romanova.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192832
91177308-0d34-0410-b5e6-
96231b3b80d8
Yunzhong Gao [Wed, 16 Oct 2013 19:07:02 +0000 (19:07 +0000)]
Enabling 3DNow! prefetch instruction support for a few AMD processors in the
clang front end. This change will allow the __PRFCHW__ macro to be set on these
processors and hence include prfchwintrin.h in x86intrin.h header. Support for
the intrinsic itself seems to have already been added in r178041.
Differential Revision: http://llvm-reviews.chandlerc.com/D1934
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192829
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 16 Oct 2013 18:52:17 +0000 (18:52 +0000)]
ObjectiveC migrator. Use 'assign' for 'delegate'
properties. // rdar://
15231860
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192826
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Wed, 16 Oct 2013 18:24:06 +0000 (18:24 +0000)]
[-cxx-abi microsoft] Fix this argument/parameter offsets for virtual destructors in the presence of virtual bases
Reviewed at http://llvm-reviews.chandlerc.com/D1939
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192822
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 16 Oct 2013 17:51:43 +0000 (17:51 +0000)]
ObjectiveC++: support for passing C++11 style initialized temporaries to
objc++ properties using property-dot syntax.
// rdar://
14654207
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192819
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Wed, 16 Oct 2013 17:45:35 +0000 (17:45 +0000)]
[analyzer] Don't draw edges to C++11 in-class member initializers.
Since these aren't lexically in the constructor, drawing arrows would
be a horrible jump across the body of the class. We could still do
better here by skipping over unimportant initializers, but this at least
keeps everything within the body of the constructor.
<rdar://problem/
14960554>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192818
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 16 Oct 2013 17:42:39 +0000 (17:42 +0000)]
Driver: Factor duplicated code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192817
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 16 Oct 2013 17:13:08 +0000 (17:13 +0000)]
[mips] Enable frame-pointer elimination for -O1 and above.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192815
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 16 Oct 2013 16:32:17 +0000 (16:32 +0000)]
Add a note about clang now rejecting unknown options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192808
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 16 Oct 2013 16:30:39 +0000 (16:30 +0000)]
Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192807
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 16 Oct 2013 16:21:43 +0000 (16:21 +0000)]
Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192804
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 16 Oct 2013 16:21:04 +0000 (16:21 +0000)]
Sema: Simplify the check if a method returns an instance of the class.
Just checking if the parent of the method is the same as the return type
should be sufficient. Also fixes PR17587.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192802
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 16 Oct 2013 16:09:16 +0000 (16:09 +0000)]
[AArch64] Add support for NEON scalar signed saturating accumulated of unsigned
value and unsigned saturating accumulate of signed value instructions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192801
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Wed, 16 Oct 2013 11:38:29 +0000 (11:38 +0000)]
Remove a workaround for PR16406 from the vtables-virtual-inheritance test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192786
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 16 Oct 2013 01:40:34 +0000 (01:40 +0000)]
On 32 bit windows, mangle stdcall and fastcall decls in clang.
This removes the dependency on the llvm mangler doing it for us. In isolation,
the benefit is that the testing of what mangling is applied is all in one place:
(C, C++) X (Itanium, Microsoft) are all handled by clang.
This also gives me hope that in the future the llvm mangler (and llvm-ar) will
not depend on TargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192762
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 15 Oct 2013 23:19:58 +0000 (23:19 +0000)]
Test that we can merge together explicit and partial specializations from
merged declarations of a class template.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192746
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 15 Oct 2013 22:02:41 +0000 (22:02 +0000)]
C++ modules: merging for enumerations and enumerators with multiple definitions
(eg through template instantiations in multiple modules).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192740
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 15 Oct 2013 21:58:30 +0000 (21:58 +0000)]
Teach the AST dumper to dump the canonical declaration for a mergeable declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192739
91177308-0d34-0410-b5e6-
96231b3b80d8
Yunzhong Gao [Tue, 15 Oct 2013 21:33:02 +0000 (21:33 +0000)]
Remove this regression test now that PR17578 is fixed (r192674). The fix is to
reject this test case at the Sema stage, so no CodeGen test should be needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192738
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 15 Oct 2013 21:22:34 +0000 (21:22 +0000)]
Reflow slightly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192736
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 15 Oct 2013 21:19:02 +0000 (21:19 +0000)]
[AArch64] Add support for NEON scalar signed saturating absolute value and
scalar signed saturating negate instructions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192734
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 15 Oct 2013 19:07:14 +0000 (19:07 +0000)]
Add constant evaluation support for __builtin_isinf, __builtin_isfinite,
__builtin_isnan, and __builtin_isnormal. Patch by Karthik Bhat! Tests by me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192729
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 15 Oct 2013 18:53:18 +0000 (18:53 +0000)]
Add llvm_unreachable to pacify GCC's dropping off non-void function warning.
+ 80 cols fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192728
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 15 Oct 2013 18:38:02 +0000 (18:38 +0000)]
ms-compat: Fix taking the address of a member of a dependent base
If unqualified id lookup fails while parsing a class template with a
dependent base, clang with -fms-compatibility will pretend the user
prefixed the name with 'this->' in order to delay the lookup. However,
if there was a unary ampersand, Sema::ActOnDependentIdExpression() will
create a DependentDeclRefExpr, which is not what we wanted at all. Fix
this by building the CXXDependentScopeMemberExpr directly instead.
In order to be fully MSVC compatible, we would have to defer all
attempts at name lookup to instantiation time. However, until we have
real problems with system headers that can't be parsed, we'll put off
implementing that.
Fixes PR16014.
Reviewers: rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D1892
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192727
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 15 Oct 2013 17:37:55 +0000 (17:37 +0000)]
[libclang] For an unscoped enum include the enumerators in the top-level code-completion hash since they enter the top-level namespace.
rdar://
14703327
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192720
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 15 Oct 2013 17:16:30 +0000 (17:16 +0000)]
ObjectiveC driver. Scrap -fno-objc-legacy-dispatch for NeXT
runtime. It will be silently ignored and regardless
of deployment target. // rdar://
14803286
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192719
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 15 Oct 2013 17:00:53 +0000 (17:00 +0000)]
[libclang] When querying for the availability of an enumerator, pick up the availability from the enum declaration.
rdar://
14789001.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192718
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 15 Oct 2013 15:40:03 +0000 (15:40 +0000)]
Don't depend on alias to declarations.
Accepting them is a bug (pr17535), not a feature.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192712
91177308-0d34-0410-b5e6-
96231b3b80d8
Serge Pavlov [Tue, 15 Oct 2013 14:24:32 +0000 (14:24 +0000)]
Fixed code style of my change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192708
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 15 Oct 2013 09:50:08 +0000 (09:50 +0000)]
Sema: Cleanup formatting of C++ exceptions related code
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192684
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 15 Oct 2013 09:33:02 +0000 (09:33 +0000)]
Sema: Cleanup formatting of SEH related code
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192683
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 15 Oct 2013 09:30:14 +0000 (09:30 +0000)]
Sema: Don't crash when __try/__except/__finally appears in a template function
We wouldn't transform the compound statement in any of these forms,
causing crashes when it got time to act on them. Additionally, we
wouldn't check to see if the handler was invalid before deciding whether
or not we should continue acting on the __try.
This fixes PR17584.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192682
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 15 Oct 2013 08:33:43 +0000 (08:33 +0000)]
docs: Remove incompatibility with Solaris shell
There doesn't seem to be a need in checking if a directory exists if we
will just rm -rf it once we affirm that it does. Instead, just blindly
try to delete it.
This fixes PR17541.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192680
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 15 Oct 2013 06:36:47 +0000 (06:36 +0000)]
clang/test/Driver/netbsd.c*: Tweak path separators to be matched on win32 driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192676
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 15 Oct 2013 06:28:23 +0000 (06:28 +0000)]
Sema: Consider it an error to apply __builtin_offsetof to a member in a virtual base
icc 13 and g++ 4.9 both reject this while we would crash.
Fixes PR17578.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192674
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Oct 2013 05:25:17 +0000 (05:25 +0000)]
Special case '%C' handling in ObjC format strings to handle integer literals that can represent unicode characters
Fixes <rdar://problem/
13991617>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192673
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 15 Oct 2013 04:56:17 +0000 (04:56 +0000)]
Correctly skip type sugar when determining the width of an enum type. Derived
from a patch by Justin Bogner.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192671
91177308-0d34-0410-b5e6-
96231b3b80d8