Commit Graph

54131 Commits

Author SHA1 Message Date
NAKAMURA Takumi fb8654a881 [CMake] Upate libdeps in FrontendTests corresponding to r215145.
llvm-svn: 215177
2014-08-08 01:26:23 +00:00
David Majnemer d96b99740d MS ABI: Don't force bases to have an inheritance model
Previously, assigning an inheritance model to a derived class would
trigger further assiginments to the various bases of the class.  This
was done to fix a bug where we couldn't handle an implicit
base-to-derived conversion for pointers-to-members when the conversion
was ambiguous at an earlier point.

However, this is not how the MS scheme works.  Instead, assign
inheritance models to *just* the class which owns to declaration we
ended up referencing.

N.B.  This result is surprising in many ways.  It means that it is
possible for a base to have a "larger" inheritance model than it's
derived classes.  It also means that bases in the conversion path do not
get assigned a model.

struct A { void f(); void f(int); };
struct B : A {};
struct C : B {};
void f() { void (C::*x)() = &A::f; }

We can only begin to assign an inheritance model *after* we've seen the
address-of but *before* we've done the implicit conversion the more
derived pointer-to-member type.  After that point, both 'A' and 'C' will
have an inheritance model but 'B' will not.  Surprising, right?

llvm-svn: 215174
2014-08-08 00:10:39 +00:00
David Majnemer b3e5654923 MS ABI: Handle member function pointers returning a member data pointer
MSVC doesn't decide what the inheritance model for a returned member
pointer *until* a call expression returns it.

This fixes PR20017.

llvm-svn: 215164
2014-08-07 22:56:13 +00:00
Eric Christopher 3668534f92 Temporarily Revert "Update for llvm API change."
This reverts commit 215113 to match the reversion in llvm.

llvm-svn: 215156
2014-08-07 22:09:08 +00:00
Reid Kleckner d3b23d611b Debug info: Use the vbtable offset for virtual bases in the MS ABI
There are no vtable offset offsets in the MS ABI, but vbtable offsets
are analogous.  There are no consumers of this information yet, but at
least we don't crash now.

llvm-svn: 215149
2014-08-07 21:29:25 +00:00
Richard Smith d6db68c181 [modules] Don't defer performing updates if we have incomplete redecl chains.
Instead, perform them carefully immediately.

llvm-svn: 215147
2014-08-07 20:58:41 +00:00
Fariborz Jahanian d45e7cec42 Objective-C arc. Switch the Objective-C dictionary literal in ARC mode
to use non-retain/autorelease API variants of ObjC objects. wip.
rdar://17554063

llvm-svn: 215146
2014-08-07 20:57:35 +00:00
Benjamin Kramer 88d99e4f42 Flip the order the preprocessor and frontendaction are informed of the end of a file.
This allows using EndOfMainFile from a PPCallback to access data from the
action. The pattern of PPCallback referencing an action is common in clang-tidy.

Differential Revision: http://reviews.llvm.org/D4773

llvm-svn: 215145
2014-08-07 20:51:16 +00:00
Reid Kleckner 65a2f640d1 Revert "Debug info: Use record layout to find vbase offsets instead of vtables"
This reverts commit r215137.

This doesn't work at all, an offset-offset is probably different than an
offset.  I'm scared that this passed our normal test suite.

llvm-svn: 215141
2014-08-07 20:36:48 +00:00
Reid Kleckner 9f6e438022 Debug info: Use record layout to find vbase offsets instead of vtables
This fixes an assertion when generating full debug info in the MS ABI
for classes with virtual bases.

Fixes PR20579.

llvm-svn: 215137
2014-08-07 19:43:01 +00:00
Richard Smith 4d2357948b [modules] When emitting an update record containing the body of a destructor,
also emit the updated 'operator delete' looked up for that destructor. Switch
from UpdateDecl to an actual update record when this happens due to implicitly
defining a special member function and unify this code path and the one for
instantiating a function definition.

llvm-svn: 215132
2014-08-07 18:53:08 +00:00
Justin Bogner 69ba3306fc test/Modules: Use FileCheck's -allow-empty instead of "count 0"
Piping stderr into "count 0" in tests doesn't work - things like guard
malloc write to stderr and mess up the count. This comes up all the
time, so I've added a feature to FileCheck to fix it this time.

Fixes test failures caused by r215046 under guard malloc.

llvm-svn: 215129
2014-08-07 18:45:21 +00:00
Manuel Klimek edf925b935 Mark successors as reachable/unreachable instead of changing the CFG.
As suggested by Ted, this makes a few warnings less aggressive.

llvm-svn: 215128
2014-08-07 18:44:19 +00:00
Manuel Klimek cadc603e91 Fix CFG for temporary dtors when the branch taken is known.
Use the parent context when visiting temporaries when we do not insert a
temporary dtor decision branch.

llvm-svn: 215120
2014-08-07 17:02:21 +00:00
Manuel Klimek 7c03013c8b Model temporary destructors from logical operators with known values.
If the truth value of a LHS is known, we can build the knowledge whether
a temporary destructor is executed or not into the CFG. This is needed
by the return type analysis.

llvm-svn: 215118
2014-08-07 16:05:51 +00:00
Manuel Klimek 0ce9108104 Only have one path in the CFG for ternaries if the condition is known.
The return type analysis requires that the CFG is simplified when the
truth values of branches are statically known at analysis time.

llvm-svn: 215114
2014-08-07 14:25:43 +00:00
Rafael Espindola b0ece4e07d Update for llvm API change.
llvm-svn: 215113
2014-08-07 14:23:03 +00:00
Manuel Klimek b5616c9f8d Re-applying r214962.
Changes to the original patch:
- model the CFG for temporary destructors in conditional operators so that
  the destructors of the true and false branch are always exclusive. This
  is necessary because we must not have impossible paths for the path
  based analysis to work.
- add multiple regression tests with ternary operators

Original description:
Fix modelling of non-lifetime-extended temporary destructors in the
analyzer.

Changes to the CFG:
When creating the CFG for temporary destructors, we create a structure
that mirrors the branch structure of the conditionally executed
temporary constructors in a full expression.
The branches we create use a CXXBindTemporaryExpr as terminator which
corresponds to the temporary constructor which must have been executed
to enter the destruction branch.

2. Changes to the Analyzer:
When we visit a CXXBindTemporaryExpr we mark the CXXBindTemporaryExpr as
executed in the state; when we reach a branch that contains the
corresponding CXXBindTemporaryExpr as terminator, we branch out
depending on whether the corresponding CXXBindTemporaryExpr was marked
as executed.

llvm-svn: 215096
2014-08-07 10:42:17 +00:00
Justin Bogner 4d10c23909 Driver: Add tests for -fprofile-arcs and -fno-profile-arcs
I tried to be lazy and get away with no test in r215051, but Chad
caught me :)

llvm-svn: 215053
2014-08-07 03:58:32 +00:00
Justin Bogner 31a4aca69b Driver: Add -fno-profile-arcs to go with -fprofile-arcs
This is a trivial gcc-compatible change.

llvm-svn: 215051
2014-08-07 03:14:34 +00:00
Richard Trieu bd3305b60f Update the context location of the condition of a conditional operator to the
question mark instead of the context of the conditional operator.  The
condition does not need the context of the conditional operator at all.

llvm-svn: 215048
2014-08-07 02:09:05 +00:00
Reid Kleckner f650c0afd4 Make FullExprArg trivially copyable by removing the copy ctor
The default copy ctor is good.  This avoids using inalloca for a bunch
of Sema methods when self-hosting.

llvm-svn: 215047
2014-08-07 01:00:42 +00:00
Richard Smith 3be1cb294f Use -Rblah, not -Wblah, to control remark diagnostics. This was always the
intent when we added remark support, but was never implemented in the general
case, because the first -R flags didn't need it. (-Rpass= had special handling
to accomodate its argument.)

-Rno-foo, -Reverything, and -Rno-everything can be used to turn off a remark,
or to turn on or off all remarks. Per discussion on cfe-commits, -Weverything
does not affect remarks, and -Reverything does not affect warnings or errors.

The only "real" -R flag we have right now is -Rmodule-build; that flag is
effectively renamed from -Wmodule-build to -Rmodule-build by this change.

-Wpass and -Wno-pass (and their friends) are also renamed to -Rpass and
-Rno-pass by this change; it's not completely clear whether we intended to have
a -Rpass (with no =pattern), but that is unchanged by this commit, other than
the flag name. The default pattern is effectively one which matches no passes.
In future, we may want to make the default pattern be .*, so that -Reverything
works for -Rpass properly.

llvm-svn: 215046
2014-08-07 00:24:21 +00:00
Reid Kleckner 4f1fc35b13 Add back the leading space when printing commands with -###
This was an unintentional behavior change from r214924.

llvm-svn: 215044
2014-08-07 00:05:00 +00:00
Fariborz Jahanian 2a25dba153 Objective-C ARC. More code for Objective-C's
new APIs for literals. nfc. wip. rdar://17554063

llvm-svn: 215043
2014-08-06 23:40:31 +00:00
Rui Ueyama a89f9c8fdb Revert "Fix modelling of non-lifetime-extended temporary destructors in the analyzer."
This reverts commit r214962 because after the change the
following code doesn't compile with -Wreturn-type -Werror.

  #include <cstdlib>

  class NoReturn {
  public:
    ~NoReturn() __attribute__((noreturn)) { exit(1); }
  };

  int check() {
    true ? NoReturn() : NoReturn();
  }

llvm-svn: 214998
2014-08-06 22:01:54 +00:00
Fariborz Jahanian 501e71c86b Objective-C ARC. Adding declarations for Objective-C's
new APIs for literals. nfc. wip. rdar://17554063

llvm-svn: 214993
2014-08-06 20:56:21 +00:00
Fariborz Jahanian 413297c53d Objective-C ARC. First patch toward generating new APIs
for Objective-C's array and dictionary literals.
rdar://17554063. This is wip.

llvm-svn: 214983
2014-08-06 18:13:46 +00:00
NAKAMURA Takumi 7160c4d22f FormatTokenLexer: Avoid non-static member initializer.
llvm-svn: 214976
2014-08-06 16:53:13 +00:00
Manuel Klimek 89df13e913 Remove unnecessary semicolon.
llvm-svn: 214970
2014-08-06 14:21:59 +00:00
Daniel Jasper 78b1949950 clang-format: Correct SBPO_Always-behavior after function-like keywords
Before:
  auto f (int x) -> decltype(x) { return sizeof(x); }
  int g () noexcept(someCall ());
  static_assert(sizeof(char) == 1, "Your compiler is broken");

After:
  auto f (int x) -> decltype (x) { return sizeof (x); }
  int g () noexcept (someCall ());
  static_assert (sizeof (char) == 1, "Your compiler is broken");

This fixes llvm.org/PR20559.
Patch by Roman Kashitsyn, thank you!

llvm-svn: 214969
2014-08-06 14:15:41 +00:00
Dan Liew b954493890 Fix sphinx warning.
llvm-svn: 214967
2014-08-06 13:49:33 +00:00
Daniel Jasper 4718944399 clang-format: Add special comments to disable formatting.
With this patch:
  int ThisWillBeFormatted;
  // clang-format off
  int   ThisWontBeFormatted;
  // clang-format on
  int Formatted;

This is for regions where a significantly nicer code layout can be found
knowing the content of the code.

This fixes llvm.org/PR20463.

llvm-svn: 214966
2014-08-06 13:40:26 +00:00
Daniel Jasper 316ab38ed8 clang-format: Fix indentation in multi-line placement new.
Before:
  auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =
      new (aaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa))
      typename aaaaaaaaaaaaaaaaaaaaaaaa();

After:
  auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =
      new (aaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa))
          typename aaaaaaaaaaaaaaaaaaaaaaaa();

llvm-svn: 214964
2014-08-06 13:14:58 +00:00
Manuel Klimek d9b4ad6e1f Fix modelling of non-lifetime-extended temporary destructors in the analyzer.
1. Changes to the CFG:
When creating the CFG for temporary destructors, we create a structure
that mirrors the branch structure of the conditionally executed
temporary constructors in a full expression.
The branches we create use a CXXBindTemporaryExpr as terminator which
corresponds to the temporary constructor which must have been executed
to enter the destruction branch.

2. Changes to the Analyzer:
When we visit a CXXBindTemporaryExpr we mark the CXXBindTemporaryExpr as
executed in the state; when we reach a branch that contains the
corresponding CXXBindTemporaryExpr as terminator, we branch out
depending on whether the corresponding CXXBindTemporaryExpr was marked
as executed.

llvm-svn: 214962
2014-08-06 12:45:51 +00:00
Simon Atanasyan 898b8ab5be [Driver] Add missed include header.
llvm-svn: 214950
2014-08-06 06:04:48 +00:00
Simon Atanasyan 9e49e145b1 [Driver] Move information about toolchain specific include directories
from the common driver code to the corresponding `MultilibSet` declarations.

Now the `MultilibSet` can hold an optional callback function which is
responsible to return a set of include directories specific for the toolchain.
That allows to remove MIPS toolchain specific directories from
`Linux::AddClangSystemIncludeArgs` method and simplify adding new directories
in the future.

llvm-svn: 214949
2014-08-06 05:44:47 +00:00
David Majnemer ff9075f054 MS ABI: Mangle lambdas which are given the same mangling number
It is possible for lambdas to get the same mangling number because they
may exist in different mangling contexts.  To handle this correctly,
mangle the context into the name as well.

llvm-svn: 214947
2014-08-06 03:12:47 +00:00
Rui Ueyama cfea160681 Remove trailing whitespaces
llvm-svn: 214935
2014-08-05 23:43:21 +00:00
David Majnemer 57fbc0c35f MS ABI: Mangle empty type parameter packs compatibly
The MS mangling scheme apparently has separate manglings for type and
non-type parameter packs when they are empty.  Match template arguments
with parameters during mangling; check the parameter to see if it was
destined to hold type-ish things or nontype-ish things.

Differential Revision: http://reviews.llvm.org/D4792

llvm-svn: 214932
2014-08-05 22:43:45 +00:00
Reid Kleckner 74a6816b33 Fix Driver tests that I broke on Windows in r214924
llvm-svn: 214931
2014-08-05 22:39:07 +00:00
Eli Bendersky d28bc5e2f2 Expose the name mangling C API to Python bindings.
llvm-svn: 214930
2014-08-05 22:27:50 +00:00
Reid Kleckner 822434da9f Make crash diagnostics on Windows the tiniest bit more useful
This escapes any backslashes in the executable path and fixes an issue
with a trailing quote when the main file name had to be quoted during
printing.

It's impossible to test this without putting backslashes or quotes into
the executable path, so I didn't add automated tests.

The crash diagnostics are still only useful if you're using bash on
Windows, though.  This should probably be writing a batch file instead.

llvm-svn: 214924
2014-08-05 20:49:12 +00:00
Fariborz Jahanian bcd82afad6 Introduce f[no-]max-unknown-pointer-align=[number] option
to instruct the code generator to not enforce a higher alignment 
than the given number (of bytes) when accessing memory via an opaque 
pointer or reference. Patch reviewed by John McCall (with post-commit
review pending). rdar://16254558

llvm-svn: 214911
2014-08-05 18:37:48 +00:00
Anton Yartsev 4e4cb6bc30 [Analyzer] fix for PR19102
Newly-created unconsumed instance is now assumed escaped if an invoked constructor has an argument of a pointer-to-record type.

llvm-svn: 214909
2014-08-05 18:26:05 +00:00
Arthur Marble 05b0798916 Added f and m flags to be ignored. These will not display a warning. The revision
for this patch is here: http://reviews.llvm.org/D4570. This will help with the
rebuild of Debian with clang. Here is a link to the errors that Debian is
experiencing: http://clang.debian.net/status.php?version=3.4.2&key=UNKNOWN_ARG

llvm-svn: 214907
2014-08-05 18:21:20 +00:00
Arthur Marble 731f6d380f Added flags that should be ignored for compatibility. These flags will display
a warning. Revision for this patch is here: http://reviews.llvm.org/D4565. This
patch will help with the rebuild of Debian with clang and many other projects
that wish to use clang. Here is a link to the errors that Debian is experiencing:
http://clang.debian.net/status.php?version=3.4.2&key=UNKNOWN_ARG

llvm-svn: 214906
2014-08-05 18:13:48 +00:00
Chad Rosier 0a84f17882 [PR19983] SBPO_Always not covering all the cases.
Patch by "Roman Kashitsyn" <romankashicin@gmail.com>.
Phabricator revision: http://reviews.llvm.org/D4788

llvm-svn: 214904
2014-08-05 17:58:54 +00:00
Adam Nemet 5bf7baa938 [AVX512] Add intrinsic for valignd/q
Note that similar to palingr, we could further optimize these to emit
shufflevector when the shift count is <=64.  This however does not
change the overall design that unlike palignr we would still need the LLVM
intrinsic corresponding to this intruction to handle the >64 cases.  (palignr
uses the psrldq intrinsic in this case.)

llvm-svn: 214891
2014-08-05 17:28:23 +00:00
Hans Wennborg da312809d4 ReleaseNotes: try to fix links
llvm-svn: 214883
2014-08-05 17:19:14 +00:00
Hans Wennborg 458fb14407 ReleaseNotes: mention basic debug info and ASan support in the Windows blurb
llvm-svn: 214882
2014-08-05 17:15:00 +00:00
NAKAMURA Takumi 360927923f ASTMatchersTests/matchesConditionallyWithCuda: Add -fno-ms-extensions, and get rid of initializer list.
I am not sure whether -xcuda might imply -fno-ms-extensions.

llvm-svn: 214876
2014-08-05 15:54:43 +00:00
NAKAMURA Takumi 7c15dd79de ASTMatchers.h: Fix an annotation. [-Wdocumentation-html]
Angle brackets, aka &lt; &gt;, should be escaped.

llvm-svn: 214870
2014-08-05 15:01:31 +00:00
NAKAMURA Takumi 51d35107ff [CMake] clangCodeGen: Update libdeps to add clangLex for PPChainedCallbacks.
llvm-svn: 214869
2014-08-05 15:01:12 +00:00
Daniel Jasper ca4ea1ce59 clang-format: Add option to always break after a function's return type.
This is required for GNU coding style, among others.

Also update the configuration documentation.

Modified from an original patch by Jarkko Hietaniemi, thank you!

llvm-svn: 214858
2014-08-05 12:16:31 +00:00
Daniel Jasper d9670878d4 clang-format: Break before 'else' in Stroustrup style.
Seems to be the desired thing to do according to:
  http://www.stroustrup.com/Programming/PPP-style-rev3.pdf

Patch by Jarkko Hietaniemi, thank you!

llvm-svn: 214857
2014-08-05 12:06:20 +00:00
Aaron Ballman 202f3c5346 Updating the documentation comment to list another parameter. No functional changes.
llvm-svn: 214856
2014-08-05 11:48:21 +00:00
Tim Northover 00853e5b6a MachO: set sizeof result type to what embedded headers expect.
Embedded systems seem to have inherited Darwin's choise of "unsigned long" for
size_t (via a bunch of headers), so we should respect that.

rdar://problem/17872787

llvm-svn: 214854
2014-08-05 11:07:26 +00:00
Manuel Klimek d52a3b8897 Adds AST matchers for matching CUDA declarations.
Patch by Jacques Pienaar.

llvm-svn: 214852
2014-08-05 09:45:53 +00:00
David Majnemer bbe649c250 MS ABI: Make the alias template mangling more correct
llvm-svn: 214847
2014-08-05 06:42:40 +00:00
Hans Wennborg 02dc000331 ReleaseNotes: add blurb about Windows support
llvm-svn: 214830
2014-08-05 00:21:23 +00:00
David Majnemer 21870f3e87 CodeGenObjCXX: Add a test for r214699
I forgot to add this with the changes for r214699.

llvm-svn: 214829
2014-08-05 00:01:15 +00:00
David Majnemer c017d3613e MS ABI: Aligned tentative definitions don't have CommonLinkage
int __declspec(align(16)) foo; is a tentative definition but the storage
for that variable should not have CommonLinkage.

llvm-svn: 214828
2014-08-05 00:01:13 +00:00
Bill Schmidt ccbe0a8022 [PPC64LE] Fix wrong IR for vec_sld and vec_vsldoi
My original LE implementation of the vsldoi instruction, with its
altivec.h interfaces vec_sld and vec_vsldoi, produces incorrect
shufflevector operations in the LLVM IR.  Correct code is generated
because the back end handles the incorrect shufflevector in a
consistent manner.

This patch and a companion patch for LLVM correct this problem by
removing the fixup from altivec.h and the corresponding fixup from the
PowerPC back end.  Several test cases are also modified to reflect the
now-correct LLVM IR.

The vec_sums and vec_vsumsws interfaces in altivec.h are also fixed,
because they used vec_perm calls intended to be recognized as vsldoi
instructions.  These vec_perm calls are now replaced with code that
more clearly shows the intent of the transformation.

llvm-svn: 214801
2014-08-04 23:21:26 +00:00
NAKAMURA Takumi 13a4f76d51 ThreadSafety.cpp: Prune bogus \param(s). [-Wdocumentation]
llvm-svn: 214796
2014-08-04 22:48:46 +00:00
NAKAMURA Takumi e9882cf315 ThreadSafetyAnalysis: Fix annotations in class members. [-Wdocumentation]
llvm-svn: 214795
2014-08-04 22:48:36 +00:00
NAKAMURA Takumi 8c8dbc3622 clang/test/Sema/struct-packed-align.c: Add the case in MS mode that alignment doesn't affect packing.
Also, revert a couple of suppressions.
  r214298, "Suppress clang/test/Sema/struct-packed-align.c for targeting LLP64."
  r214301, "Suppress clang/test/Sema/struct-packed-align.c also on msvc for investigating."

llvm-svn: 214794
2014-08-04 22:48:19 +00:00
NAKAMURA Takumi c59c644523 Trailing linefeed.
llvm-svn: 214793
2014-08-04 22:48:09 +00:00
Reid Kleckner fe5b4ed822 Remove separator parameter from static local naming code
It was always set to ".", which was duplicated in a few places.

llvm-svn: 214792
2014-08-04 22:35:30 +00:00
DeLesley Hutchins 3efd0495a0 Thread Safety Analysis: add a -Wthread-safety-negative flag that warns whenever
a mutex is acquired, but corresponding mutex is not provably not-held.  This
is based on the earlier negative requirements patch.

llvm-svn: 214789
2014-08-04 22:13:06 +00:00
Eric Christopher 3de0853b47 Update for LLVM API change.
llvm-svn: 214786
2014-08-04 21:33:42 +00:00
Hans Wennborg 35487d8e50 UsersManual: update clang-cl options
llvm-svn: 214777
2014-08-04 21:07:58 +00:00
Hans Wennborg 7c4851e3ad Don't drop dllimport from qualified friend redeclarations (PR20512)
This matches MSVC's logic, which seems to be that when the friend
declaration is qualified, it cannot be a declaration of a new symbol
and so the dll linkage doesn't change.

Differential Revision: http://reviews.llvm.org/D4764

llvm-svn: 214774
2014-08-04 20:54:39 +00:00
Aaron Ballman 2120ecfe08 Nit picky const-correctness with auto. No functional changes.
llvm-svn: 214773
2014-08-04 20:49:47 +00:00
Aaron Ballman e7c544d388 A static_assert declaration cannot be a template; adding the diagnostic for this instead of silently accepting and producing possibly-unexpected behavior.
llvm-svn: 214770
2014-08-04 20:28:35 +00:00
Alex Lorenz b4cb487c10 Revert r214757 (Same fix as r214758)
llvm-svn: 214759
2014-08-04 19:04:38 +00:00
David Blaikie 8fd9732905 Add CoverageMappingGen.cpp (introduced in r214752) to CMakeLists.txt
llvm-svn: 214758
2014-08-04 18:59:39 +00:00
Alex Lorenz 4521e19c15 add lib/CodeGen/CoverageMappingGen.cpp to CMake
llvm-svn: 214757
2014-08-04 18:55:53 +00:00
Alex Lorenz ee02499a8f Add coverage mapping generation.
This patch adds the '-fcoverage-mapping' option which
allows clang to generate the coverage mapping information
that can be used to provide code coverage analysis using
the execution counts obtained from the instrumentation 
based profiling (-fprofile-instr-generate).

llvm-svn: 214752
2014-08-04 18:41:51 +00:00
Aaron Ballman 95305e9d79 Removing some extraneous spaces; no functional changes intended.
llvm-svn: 214739
2014-08-04 17:49:55 +00:00
Olivier Goffart f6fabcc27b Fix crash when accessing a property of an invalid interface
llvm-svn: 214735
2014-08-04 17:28:11 +00:00
Olivier Goffart 4c182c8bb1 Fix crash when assiging to a property with an invalid type
This is a regression from clang 3.4

Set the result to ExprError and returns true, rather than simply
returns false because errors have been reported already and returning
false show a confusing error

llvm-svn: 214734
2014-08-04 17:28:05 +00:00
Aaron Ballman 5d153e3133 Diagnose GNU-style attributes preceding virt-specifiers, but only when the attribute is known to GCC. Clang accepts attributes in this position, but
GCC does not, so this is a GCC-compat warning. If the attribute is not known to GCC, then the diagnostic is suppressed.

llvm-svn: 214730
2014-08-04 17:03:51 +00:00
DeLesley Hutchins 4266522ab9 Thread safety analysis: Add support for negative requirements, which are
capability expressions of the form !expr, and denote a capability that must
not be held.

llvm-svn: 214725
2014-08-04 16:10:59 +00:00
Aaron Ballman dfe8cc51c2 Highlight the offending function parameter when the format argument refers to an invalid function parameter type.
llvm-svn: 214723
2014-08-04 15:26:33 +00:00
Aaron Ballman 2f9e88b9f2 Highlight the offending function parameter when the format_arg argument refers to an invalid function parameter type.
llvm-svn: 214722
2014-08-04 15:17:29 +00:00
Daniel Jasper 65df5aa918 clang-format: Understand parameter pack initialization.
Before:
  Constructor(A... a) : a_(X<A> { std::forward<A>(a) }...) {}

After:
  Constructor(A... a) : a_(X<A>{std::forward<A>(a)}...) {}

llvm-svn: 214720
2014-08-04 14:51:02 +00:00
Simon Atanasyan 2c590ffa0e [Driver][Mips] Construct dynamic linker path by string concatination.
That reduces a number of `if` operators and prevent a combinatorics explosion
if/when more dynamic linker path variants added.

No functional changes.

llvm-svn: 214712
2014-08-04 12:57:52 +00:00
Pavel Chupin fd223e1680 [x32] Add __int128 support
Summary:
Adding __int128 support explicitly for x86_64 because currently it's on
only when pointer size >= 64 which is not the case for x32.

Test Plan: One of the tests using __int128 is updated

Reviewers: atanasyan, chandlerc

Subscribers: cfe-commits, rob.khasanov, zinovy.nis, dschuff

Differential Revision: http://reviews.llvm.org/D4755

llvm-svn: 214710
2014-08-04 12:39:43 +00:00
Keith Walker c88a91fa75 Fix tests Clang::Sema/statements.c and Clang::SemaTemplate/instantiate-expr-1.cpp when AArch64 is the default target.
Commit r213935 added additional validation of register constants/size for AArch64 and because these tests which contain Intel assembler the new validation caused these tests to fail when the default target is changed to an AArch64 target.

llvm-svn: 214706
2014-08-04 10:13:09 +00:00
David Majnemer 11d2427b21 AST: Fix the mangling for unqualified-blocks
CXXNameMangler::mangleUnqualifiedBlock believed that
MangleContext::getBlockId returned something that used Itanium-style
discriminator numbers.

Discriminator numbers start their numberign from 1 and the first
mangling that actually gets any sort of number mangled in is the second
discriminator.

However, Block IDs start from zero.  The logic for omitting the mangling
number did a ' > 1' instead of a ' > 0' comparison; this could
potentially cause mangling conflicts.

llvm-svn: 214699
2014-08-04 06:16:50 +00:00
David Majnemer 37bffb6f3a AST: Propagate 'AlignIsRequired' though many levels of typedefs
A typedef of a typedef should have AlignIsRequired if *either* typedef
has an AlignAttr attached to it.

llvm-svn: 214698
2014-08-04 05:11:01 +00:00
Richard Smith 077d083b4d PR11778: Fix the rejects-valid half of this bug. We still produce the same
poorly-worded warning for a case value that is not a possible value of the
switched-on expression.

llvm-svn: 214678
2014-08-04 00:40:48 +00:00
Richard Smith 06f621d349 Don't destroy MacroInfos if we find the macro definition is invalid; it'll get
destroyed on shutdown regardless. Fixes a double-delete.

llvm-svn: 214675
2014-08-03 23:41:04 +00:00
Justin Bogner 6bcf724f52 Driver: Simplify a use of the path API
It's a bit more obvious what's going on if we use path::filename
rather than decrementing an iterator here.

llvm-svn: 214668
2014-08-03 21:46:33 +00:00
Simon Atanasyan 3ab94b910b [Mips] Add the `mips64-linux-gnu` target to the test case to check `in128`
type handling.

llvm-svn: 214662
2014-08-03 16:11:05 +00:00
NAKAMURA Takumi 0f9447d1ce Tools.cpp: Avoid std::to_string() on -fbuild-session-timestamp to appease mingw32 builder.
llvm-svn: 214656
2014-08-03 01:11:44 +00:00
Joerg Sonnenberger 466a31eb65 vcfsx and dss instructions require immediates, variables are not valid.
llvm-svn: 214635
2014-08-02 15:07:21 +00:00
NAKAMURA Takumi 70cac04c7f libclang/Makefile: Update LINK_COMPONENTS take #3. Sorry for the noise.
llvm-svn: 214620
2014-08-02 07:24:04 +00:00
NAKAMURA Takumi 3654ce35ae libclang/Makefile: Update LINK_COMPONENTS take #2.
llvm-svn: 214619
2014-08-02 07:16:14 +00:00