Commit Graph

38092 Commits

Author SHA1 Message Date
Daniel Jasper 8354ea84dd clang-format: [Java] Basic lambda support.
llvm-svn: 222524
2014-11-21 12:14:12 +00:00
Alexey Bataev ee9af45b19 [OPENMP] Disable CapturedStmt generation for standalone directives.
No functional changes, just code improvement.

llvm-svn: 222523
2014-11-21 11:33:46 +00:00
David Majnemer eca5a201f4 MS ABI: Mangle char16_t and char32_t types
These mangling make clang more compatible with MSVC 2015.
Correctly mangling char16_t and char32_t will take a little more work.

llvm-svn: 222515
2014-11-21 09:06:49 +00:00
Bob Wilson d8f4165b0d Fix missing diagnostic for unsupported TLS for some thread_local variables.
Clang r181627 moved a check for block-scope variables into this code for
handling thread storage class specifiers, but in the process, it broke the
logic for checking if the target supports TLS. Fix this with some simple
restructuring of the code. rdar://problem/18796883

llvm-svn: 222512
2014-11-21 06:52:52 +00:00
Richard Smith 5b39075668 [modules] When explicitly importing a module, it's fine for the imported module
to be newer than we were expecting. That happens if .pcm's get moved between
file systems during a distributed build. (It's still not OK for them to actually
be different, though, so we still check the size and signature matches.)

llvm-svn: 222507
2014-11-21 05:37:20 +00:00
Richard Smith e06124799b PR21323: Fix iterator invalidation issue when looking for redeclarations of a
special member function.

No test yet: the only testcases we have for this issue are extremely complex.
Testcase will be added once I get a reasonable reduction.

llvm-svn: 222506
2014-11-21 05:16:13 +00:00
Richard Trieu 3630c39972 Extend -Wuninitialized to warn when accessing uninitialized base classes in a
constructor.

llvm-svn: 222503
2014-11-21 03:10:30 +00:00
Adrian Prantl 88eec39460 Debug info for blocks: Fix a bug caught by the Verifier.
When emitting nested block definitions, the insert-at-point variant of
DIBuilder::insertDeclare() could be called with the insertion point set
to the end-of-BasicBlock sentinel, causing the parent pointer of the
CallInst to be set to the intentionally bogus value of the sentinel.

Fixed by conditionally invoking the correct version of insertDeclare().
rdar://problem/19034882

llvm-svn: 222487
2014-11-21 00:35:25 +00:00
David Blaikie af08085c86 DebugInfo: Fix another case of r222377 when we do have a definition of the variable, but we might not be emitting it (such as templates)
llvm-svn: 222485
2014-11-21 00:20:58 +00:00
Richard Smith 01014cee76 Remove code that tries to avoid transforming non-dependent call operator types
for lambda expressions. That can't ever work; we need to transform the
parameters in order to create new ones in the new call operator context.

Fixes a rejects-valid when transforming a context containing a
lambda-expression that uses its function parameters in C++14 mode.

llvm-svn: 222482
2014-11-20 23:53:14 +00:00
Richard Smith 069ecf65e5 Fix crash-on-valid if a lambda-expression appears lexically directly within a
local class inside a template.

llvm-svn: 222476
2014-11-20 22:56:34 +00:00
Reid Kleckner e35b07ad49 Intercept __crt_va_* used by MSVC "14"
Moving further into the implementor's namespace is good, but now we have
one more name to intercept.

llvm-svn: 222473
2014-11-20 22:44:03 +00:00
Richard Smith 3ef3e899a9 PR21565: Further refine the conditions for enabling eager parsing of
std::X::swap exception specifications (allowing parsing of non-conforming code
in libstdc++). The old conditions also matched the functions in MSVC's STL,
which were relying on deferred parsing here.

llvm-svn: 222471
2014-11-20 22:32:11 +00:00
Kaelyn Takata 57e07c950d Ensure all TypoExprs are diagnosed by the tree transform.
If there is more than one TypoExpr within the expr being transformed and
any but the last TypoExpr seen don't have any viable candidates, the
tree transform will be aborted early and the remaining TypoExprs are
never seen and hence never diagnosed. This adds a simple
RecursiveASTVisitor to find all of the TypoExprs to be diagnosed in the
case where typo correction of the entire expr fails (and the result of
the tree transform is an ExprError).

llvm-svn: 222465
2014-11-20 22:06:44 +00:00
Kaelyn Takata b16e632c64 Wire up delayed typo correction to DiagnoseEmptyLookup and set up
Sema::ActOnIdExpression to use the new functionality.

Among other things, this allows recovery in several cases where it
wasn't possible before (e.g. correcting a mistyped static_cast<>).

llvm-svn: 222464
2014-11-20 22:06:40 +00:00
Kaelyn Takata 6f71ce2e21 Add a flag to BuildDeclarationNameExpr to not reject invalid decls.
llvm-svn: 222463
2014-11-20 22:06:33 +00:00
Kaelyn Takata 3f9794f288 Factor out the default recovery handling.
The default handling is extended to properly create member expressions
and Objective-C ivar references.

Also detect and reject cases where multiple corrections have identical
correction distances and are valid, instead of suggesting the first one
that is found.

llvm-svn: 222462
2014-11-20 22:06:30 +00:00
Kaelyn Takata 0a31302fa1 Correctly set the SourceRange a TypoCorrection will replace.
Also clean up TypoCorrection::setCorrectionRange while we're at it.

llvm-svn: 222460
2014-11-20 22:06:26 +00:00
Anastasia Stulova 561e0aa180 Extended list of valid frontend options with '-cl-std=CL2.0'.
This option sets language mode for the compilation of a source file to be OpenCL v2.0.

Example: clang -cc1 -cl-std=CL2.0 myfile.cl
llvm-svn: 222444
2014-11-20 19:25:00 +00:00
Anastasia Stulova d26d85c1f5 Testing commit access.
llvm-svn: 222438
2014-11-20 17:57:27 +00:00
Frederic Riss 73feb0c520 Remove now dead code.
After LLVM r222434, the Variables field of DISubprograms for forward
declarations will always be null. No need to keep code around to
delete them.

llvm-svn: 222437
2014-11-20 16:24:29 +00:00
Frederic Riss c3a9d7dfbf Prepare for the DIBuilder populating DISubprogram's Variables with null.
This is a followup to r222373. A better solution to the problem solved
there is to not create the leaked nodes at all (we know that they will
never be used for forward declared functions anyway). To avoid bot
breakage in the interval between the cfe and llvm commits, add a check
that the nMDNode is not null before deleting it. This code can completely
go away after the LLVM part is in.

llvm-svn: 222433
2014-11-20 15:46:59 +00:00
Samuel Benzaquen 2c15e8ccce Replace variadic operator function pointer with an enum value.
Summary:
Replace variadic operator function pointer with an enum value.
Hiding the implementation of the variadic matcher will allow to specialize them for the operation performed.
In particular, it will allow for a more efficient allOf() matcher.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

llvm-svn: 222432
2014-11-20 15:45:53 +00:00
Daniel Jasper 6cab6784b9 clang-format: [Java] Don't align after "return".
Doesn't seem to be common practice in Java.

Before:
  return aaaaaaaaaaaaaaaaaaa
         && bbbbbbbbbbbbbbbbbbb
         && ccccccccccccccccccc;

After:
  return aaaaaaaaaaaaaaaaaaa
      && bbbbbbbbbbbbbbbbbbb
      && ccccccccccccccccccc;

Patch by Harry Terkelsen.

llvm-svn: 222424
2014-11-20 09:54:49 +00:00
Daniel Jasper caf8685958 clang-format: [Java] Don't force break before generic type method.
Before:
  Foo.bar()
      .<X>
      baz();

After:
  Foo.bar()
      .<X>baz();

Patch by Harry Terkelsen.

llvm-svn: 222423
2014-11-20 09:48:11 +00:00
Alexey Bataev cc37cc1db2 [OPENMP] Codegen for "omp flush" directive.
For each "omp flush" directive a call to "void kmpc_flush(ident_t *, ...)" function is generated.
Directive "omp flush" may have an associated list of variables to flush, but currently runtime function ignores them. So the patch generates just "call kmpc_flush(ident_t *<loc>, i32 0)".
Differential Revision: http://reviews.llvm.org/D6292

llvm-svn: 222409
2014-11-20 04:34:54 +00:00
Jordan Rose 08b3638b84 [CMake] Use .svn/wc.db as our VC dependency if it's available.
In order to keep SVNVersion.inc from being regenerated on every build, we need
to specify as a dependency a file that only changes when the VC state updates.
I previously just had .svn/entries, but that's only used by Subversion 1.6.
1.7 uses .svn/wc.db instead; prefer that if it's present.

(Thanks, Nico!)

llvm-svn: 222407
2014-11-20 03:57:45 +00:00
Richard Smith e9f130cfdf Preserve numeric literal suffixes during type canonicalization.
Patch by Pierre Gousseau! Test cases altered significantly by me.

llvm-svn: 222404
2014-11-20 03:37:32 +00:00
Richard Smith 6adb42e1ac When mangling member-expressions, skip implicit accesses of anonymous union
objects. This is consistent with GCC's behavior. Patch by Tomasz Miąsko!

llvm-svn: 222402
2014-11-20 01:35:11 +00:00
Richard Smith 5b555da775 PR21531: fix crash on invalid with unexpanded pack in case value.
llvm-svn: 222400
2014-11-20 01:24:12 +00:00
Daniel Jasper ccb68b487e clang-format: [Java] Accept generic types in enum declaration
Before:
  enum Foo implements Bar<X, Y> {
    ABC {
      ...
    }
    , CDE {
      ...
    };
  }

After:
  enum Foo implements Bar<X, Y> {
    ABC {
      ...
    },
    CDE {
      ...
    };
  }

Patch by Harry Terkelsen.

llvm-svn: 222394
2014-11-19 22:38:18 +00:00
Jordan Rose 85216ef0c3 [CMake] Always include the Clang repo version, just like the autoconf build.
Now that LLVM's helper script GetSVN.cmake actually works consistently,
there's no reason not to use it. We avoid having to regenerate SVNVersion.inc
every time by marking it as dependent on Git's reflog or SVN's entries file.

This should end most of the issues of the AST format changing and breaking
old module files: CMake-Clang should now detect that the version changed just
like Autoconf-Clang has.

Based on r190557. Depends on LLVM r222391.

llvm-svn: 222393
2014-11-19 22:03:48 +00:00
Jordan Rose 210bfe9c52 Constify a few IdentifierInfo * parameters.
No functionality change.

llvm-svn: 222392
2014-11-19 22:03:46 +00:00
Richard Smith be6dd818fb Fix bug where a trivial constexpr copy/move operation couldn't copy from an
empty non-constexpr object. Such a copy doesn't break any of the constexpr
rules.

llvm-svn: 222387
2014-11-19 21:27:17 +00:00
David Blaikie 423eb5a6a5 DebugInfo: Don't emit a 'global variable' when a static member declaration is referenced without a definition, just ensure the enclosing class (with the static member declaration) is emitted.
Addresses PR21511 by emitting appropriate metadata rather than
faux-global definitions for a variable that doesn't have a definition.

llvm-svn: 222377
2014-11-19 19:42:40 +00:00
Frederic Riss dce60a747c Fix a temporary MDNode leak.
While emitting debug information for function forward decalrations, we
create DISubprogram objects that aran't stored in the AllSubprograms
list, and thus won't get finalized by the DIBuilder. During the DIBuilder
finalize(), the temporary MDNode allocated for the DISubprogram
Variables field gets RAUWd with a non temporary DIArray. For the forward
declarations, simply delete that temporary node before we delete the
parent node, so that it doesn't leak.

llvm-svn: 222373
2014-11-19 18:53:46 +00:00
Saleem Abdulrasool 4325aaa6d9 Driver: correct typo
Fix a typo in the search path identified by Justin Bogner.

llvm-svn: 222371
2014-11-19 17:59:00 +00:00
Daniel Jasper fe2cf6673a clang-format: [Java] Ignore C++-specific keywords
Before:
  public void union
  (Object o);
  public void struct
  (Object o);
  public void delete (Object o);

After:
  public void union(Object o);
  public void struct(Object o);
  public void delete(Object o);

Patch by Harry Terkelsen, thank you!

llvm-svn: 222357
2014-11-19 14:11:11 +00:00
Daniel Sanders 59229dcb29 Allow EmitVAArg() to promote types and use this to fix some N32/N64 vararg issues for Mips.
Summary:
With this patch, passing a va_list to another function and reading 10 int's from
it works correctly on a big-endian target.

Based on a pair of patches by David Chisnall, one of which I've reworked
for the current trunk.

Reviewers: theraven, atanasyan

Reviewed By: theraven, atanasyan

Subscribers: cfe-commits

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

llvm-svn: 222339
2014-11-19 10:01:35 +00:00
David Blaikie 82e95a3c79 Update for LLVM API change to make Small(Ptr)Set::insert return pair<iterator, bool> as per the C++ standard's associative container concept.
llvm-svn: 222335
2014-11-19 07:49:47 +00:00
Richard Trieu 791b86ec55 Add the exception for strings in logical and expressions to -Wstring-conversion
for C code.

llvm-svn: 222327
2014-11-19 06:08:18 +00:00
David Blaikie 3c8c46efd7 clang-format a recent commit I made
llvm-svn: 222317
2014-11-19 05:48:40 +00:00
Nico Weber b58e51c304 Wrap to 80 columns, no behavior change.
llvm-svn: 222315
2014-11-19 05:21:39 +00:00
David Blaikie 13156b689e Standardize on StringMap::insert, removing uses of StringMap::GetOrCreateValue.
llvm-svn: 222306
2014-11-19 03:06:06 +00:00
David Blaikie 61b86d4338 Update for LLVM API change
llvm-svn: 222303
2014-11-19 02:56:13 +00:00
Daniel Jasper 3aa9a6a126 clang-format: Add option to disable alignment after opening brackets
Before:
  SomeFunction(parameter,
               parameter);

After:
  SomeFunction(parameter,
      parameter);

Patch by Harry Terkelsen, thank you!

llvm-svn: 222284
2014-11-18 23:55:27 +00:00
Daniel Jasper 6761b42b90 clang-format: Fix space between generic type parameter and square
bracket

Before:
  public Foo<X, Y> [] foos;

After:
  public Foo<X, Y>[] foos;

Patch by Harry Terkelsen. Thank you!

llvm-svn: 222283
2014-11-18 23:48:01 +00:00
Eric Christopher 917e952d2d Fix 80-column violations, trailing whitespace, comment text.
llvm-svn: 222269
2014-11-18 22:36:15 +00:00
Fariborz Jahanian ef202d96c7 [Sema] Patch to issue warning on comparing parameters with
nonnull attribute when comparison is always true/false. 
Original patch by Steven Wu. I have added extra code to prevent issuing of
warning  when the nonnull parameter is modified prior to the comparison.
This addition prevents false positives in the most obvious cases.
There may still be false positive warnings in some cases (as one of my tests
indicates), but benefit far outweighs such cases. rdar://18712242

llvm-svn: 222264
2014-11-18 21:57:54 +00:00
Alexey Bataev 62cec44ca4 [OPENMP] Additional processing of 'omp atomic read' directive.
According to OpenMP standard, Section 2.12.6, atomic Construct, '#pragma omp atomic read' is allowed to be used only for expression statements of form 'v = x;', where x and v (as applicable) are both l-value expressions with scalar type. Patch adds checks for it.

llvm-svn: 222231
2014-11-18 10:14:22 +00:00
Justin Hibbits 90ca05e5e5 Add PIC-level support to Clang.
Summary:
This distinguishes between -fpic and -fPIC now, with the additions in LLVM for
PIC level support.

Test Plan: No regressions

Reviewers: echristo, rafael

Reviewed By: rafael

Subscribers: rnk, emaste, llvm-commits

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

llvm-svn: 222227
2014-11-18 06:17:20 +00:00
Argyrios Kyrtzidis 1bde117bea [ASTReader] Add a convenience function to retrieve all the input files of a module file.
llvm-svn: 222224
2014-11-18 05:24:18 +00:00
Frederic Riss d253ed6565 Fully handle globals and functions in CGDebugInfo::getDeclarationOrDefinition()
Currently this function would return nothing for functions or globals that
haven't seen a definition yet. Make it return a forward declaration that will
get RAUWed with the definition if one is seen at a later point. The strategy
used to implement this is similar to what's done for types: the forward
declarations are stored in a vector and post processed upon finilization to
perform the required RAUWs.

For now the only user of getDeclarationOrDefinition() is EmitUsingDecl(), thus
this patch allows to emit correct imported declarations even in the absence of
an actual definition of the imported entity.

(Another user will be the debug info generation for argument default values
that I need to resurect).

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

llvm-svn: 222220
2014-11-18 03:40:51 +00:00
Frederic Riss 9db79f17c0 [DebugInfo] Move collection of various function/var decl properties into helper functions.
NFC. Helpers to be re-used in upcoming commit.

llvm-svn: 222219
2014-11-18 03:40:46 +00:00
Justin Bogner 94d384e423 InstrProf: Don't emit coverage for uninstantiated templates
We include unused functions and methods in -fcoverage-mapping so that
we can differentiate between uninstrumented and unused. This can cause
problems for uninstantiated templates though, since they may involve
an incomplete type that can't be mangled. This shows up in things like
libc++'s <unordered_map> and makes coverage unusable.

Avoid the issue by skipping uninstantiated methods of a templated
class.

llvm-svn: 222204
2014-11-18 00:34:46 +00:00
John McCall 0d8d6c094f Fix an assertion when ending a function definition.
The bug is that ExprCleanupObjects isn't always empty
in a fresh evaluation context.  New evaluation contexts just
track the current depth of the stack.

The assertion will misfire whenever we finish processing
a function body inside an expression that contained an earlier
block literal with non-trivial captures.  That's actually
a lot less likely than you'd think, though, because it has
to be a real function declaration, not just another block.
Mixed block/lambda code would work, as would a template
instantiation or a local class definition.

The code works correctly if the assertion is disabled.

rdar://16356628

llvm-svn: 222194
2014-11-18 00:19:01 +00:00
Alexander Kornienko 41c247a677 Make DiagnosticsEngine::takeClient return std::unique_ptr<>
Summary:
Make DiagnosticsEngine::takeClient return std::unique_ptr<>. Updated
callers to store conditional ownership using a pair of pointer and unique_ptr
instead of a pointer + bool. Updated code that temporarily registers clients to
use the non-owning registration (+ removed extra calls to takeClient).

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: cfe-commits

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

llvm-svn: 222193
2014-11-17 23:46:02 +00:00
Reid Kleckner d60b82f93e Handle use of default member initializers before end of outermost class
Specifically, when we have this situation:
  struct A {
    template <typename T> struct B {
      int m1 = sizeof(A);
    };
    B<int> m2;
  };

We can't parse m1's initializer eagerly because we need A to be
complete.  Therefore we wait until the end of A's class scope to parse
it. However, we can trigger instantiation of B before the end of A,
which will attempt to instantiate the field decls eagerly, and it would
build a bad field decl instantiation that said it had an initializer but
actually lacked one.

Fixed by deferring instantiation of default member initializers until
they are needed during constructor analysis. This addresses a long
standing FIXME in the code.

Fixes PR19195.

Reviewed By: rsmith

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

llvm-svn: 222192
2014-11-17 23:36:45 +00:00
Saleem Abdulrasool b7698745e9 CodeGen: make a check stricter
When targeting Windows itanium (a MSVC environment), use itanium style
exceptions rather than SEH.  Existing test cases already test this code path.
Applying this change ensures that tests wont break due to a parallel change in
LLVM (to correctly report isMSVCEnvironment).

llvm-svn: 222179
2014-11-17 22:11:07 +00:00
Sylvestre Ledru 55635cea27 Missing comma in a string array initialization (CID 1254893)
Summary:
We have this error from a while (Wed Jun 15 18:02:42 2011
r133103)

Reviewers: rsmith

Reviewed By: rsmith

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

llvm-svn: 222169
2014-11-17 19:41:49 +00:00
Hans Wennborg 6164753e81 clang-cl: Allow /Fo without an argument (PR21589)
When it's used without an argument, the default file name is
used. The same goes for /Fe.

Also, allow using /Fo, /Fa and /Fe with multiple inputs if they
don't have an argument.

llvm-svn: 222164
2014-11-17 19:16:36 +00:00
Daniel Jasper e1e348b857 clang-format: Fix more incorrect pointer detection.
Before:
  Constructor() : a(a), b(c, d *e) {}

After:
  Constructor() : a(a), b(c, d * e) {}

llvm-svn: 222158
2014-11-17 18:42:22 +00:00
Saleem Abdulrasool cb29c1ae25 Basic: tweak comment
Add a missing surrounding brace for doxygen group.  This messes with pair
jumping in vim and is annoying.  NFC.

llvm-svn: 222155
2014-11-17 18:40:15 +00:00
Sylvestre Ledru 30f1708b64 Fix the indentation: Nesting level does not match indentation (CID 1254863)
llvm-svn: 222152
2014-11-17 18:26:39 +00:00
Timur Iskhodzhanov 7081460287 Minor readability tweaks to VFTableBuilder.cpp
llvm-svn: 222140
2014-11-17 15:53:50 +00:00
Timur Iskhodzhanov 7d19fc1c37 Add a couple more examples illustrating why we need vtordisps and how they work
llvm-svn: 222133
2014-11-17 15:11:05 +00:00
Samuel Benzaquen 9743c9d88c Remove VariadicOperatorMatcherInterface as it is redundant with logic from DynTypedMatcher.
Summary:
The generic variadic matcher is faster (one less virtual function call
per match) and doesn't require template instantiations which reduces
compile time and binary size.
Registry.cpp.o generates ~14% less symbols and compiles ~7.5% faster.
The change also speeds up our clang-tidy benchmark by ~2%.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

llvm-svn: 222131
2014-11-17 14:55:49 +00:00
Alexander Kornienko 4c0ef3797b A small correction for r221884. No functional changes.
llvm-svn: 222130
2014-11-17 14:46:28 +00:00
Daniel Jasper 6a3fd8361f clang-format: Fix regression introduced in r221609.
Before:
  void f() { f(a, c *d); }

After:
  void f() { f(a, c * d); }

llvm-svn: 222128
2014-11-17 13:55:04 +00:00
Alexey Samsonov 1e715a66d7 [Sanitizer] Parse and produce all sanitizer-relevant arguments in SanitizerArgs.
In particular, make SanitizerArgs responsible for parsing
and passing down to frontend -fsanitize-recover and
-fsanitize-undefined-trap-on-error flags.

Simplify parsing -f(no-)sanitize= flags parsing: get rid of
too complex filterUnsupportedKinds function.

No functionality change.

llvm-svn: 222105
2014-11-16 20:53:53 +00:00
Richard Trieu 6572489127 Fix issues missed during the review of r222099.
Shift some functions around, make a method in Sema private,
call the correct overloaded function.  No functional change.

llvm-svn: 222081
2014-11-15 06:37:39 +00:00
Reid Kleckner b1be683074 Fix IRGen for passing transparent unions
We have had a test for this for a long time with a FIXME saying what we
should be doing. This just does it.

Fixes PR21573.

llvm-svn: 222074
2014-11-15 01:41:41 +00:00
Duncan P. N. Exon Smith 2f68dadb0a CGDebugInfo: Update for DIBuilder API change
Tracking LLVM commit r222070.

llvm-svn: 222071
2014-11-15 00:24:50 +00:00
Fariborz Jahanian 68e7938361 This patch fixes couple of bugs for predefined expression
used inside blocks. It fixes a crash in naming code
for __func__ etc. when used in a block declared globally.
It also brings back old naming convention for
predefined expression which was broken. rdar://18961148

llvm-svn: 222065
2014-11-14 23:55:27 +00:00
Aaron Ballman 43f40103f0 [c++1z] Support [[deprecated]] attributes on namespaces. Note that it only applies to situations where the namespace is mentioned. Thus, use on anonymous namespaces is diagnosed.
llvm-svn: 222054
2014-11-14 22:34:56 +00:00
Anton Korobeynikov 5f951ee8bd Recommit r222044 with a test fix - it does not make sense to hunt
for a typedef before arithmetic conversion in all rare corner cases.

llvm-svn: 222049
2014-11-14 22:09:15 +00:00
Aaron Ballman d38341e942 Removing an unused variable; NFC.
llvm-svn: 222048
2014-11-14 21:57:30 +00:00
Anton Korobeynikov 50fc68f2d9 Again revert r222044 to resolve darwin objc test fails.
llvm-svn: 222047
2014-11-14 21:54:46 +00:00
Anton Korobeynikov dc12b367bc Follow-up to D6217
Summary:
Ok, here is somewhat addition to D6217 aiming to preserve old darwin behavior wrt the typedefed types. The actual change to SemaChecking turned out to be pretty gross, in particular:
  1. We need to extract the typedef'ed type for proper diagnostics
  2. We need to walk over paren expressions as well

Reviewers: chandlerc, rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

llvm-svn: 222044
2014-11-14 21:41:07 +00:00
Steven Wu 2e2b0b3942 Add DiagID and Warning Flag to DiagnosticsLog
llvm-svn: 222042
2014-11-14 21:23:56 +00:00
David Blaikie 1cbb971c2d Remove some redundant virtual specifiers on overriden functions.
llvm-svn: 222024
2014-11-14 19:09:44 +00:00
Yaron Keren 8fbe439869 Typo fix.
llvm-svn: 222016
2014-11-14 18:33:42 +00:00
Daniel Jasper 4bfa736f1b clang-format: [Java] Further improve generics formatting.
llvm-svn: 222011
2014-11-14 17:30:15 +00:00
Daniel Jasper d127e3b6af clang-format: Correctly detect multiplication in ctor initializer.
Before:
  Constructor() : a(a), area(width *height) {}

After:
  Constructor() : a(a), area(width * height) {}

llvm-svn: 222010
2014-11-14 17:26:49 +00:00
Fariborz Jahanian b7859ddf9b [Sema]. Warn when logical expression is a pointer
which evaluates to true. rdar://18716393.
Reviewed by Richard Trieu

llvm-svn: 222009
2014-11-14 17:12:50 +00:00
Aaron Ballman 918474c7f9 Silencing a -Wparentheses warning; NFC.
llvm-svn: 221998
2014-11-14 14:40:49 +00:00
Timur Iskhodzhanov 4d28002728 Replace weird whitespace symbols with good old spaces
llvm-svn: 221997
2014-11-14 14:16:34 +00:00
Timur Iskhodzhanov 46a18efa5a Add one illustrative class hierarchy as an example in a comment to the VFTableBuilder code
llvm-svn: 221996
2014-11-14 14:10:15 +00:00
Aaron Ballman a0344c5d7b Complete support for the SD-6 standing document (based off N4200) with support for __has_cpp_attribute.
llvm-svn: 221991
2014-11-14 13:44:02 +00:00
Daniel Jasper 6c0ee17b89 clang-format: Improve function parameter packing.
Before:
  void SomeLoooooooooooongFunction(
      std::unique_ptr<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>
          aaaaaaaaaaaaaaaaaaaaaaaaaa, int bbbbbbbbbbbbb);

After:
  void SomeLoooooooooooongFunction(
      std::unique_ptr<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>
          aaaaaaaaaaaaaaaaaaaaaaaaaa,
      int bbbbbbbbbbbbb);

llvm-svn: 221989
2014-11-14 13:14:45 +00:00
Bill Schmidt 8ff672d397 [PowerPC] Enable vec_perm for long long and double vector types for VSX
VSX makes the "vector long long" and "vector double" types available.
This patch enables the vec_perm interface for these types.  The same
builtin is generated regardless of the specified type, so no
additional work or testing is needed in the back end.  Tests are added
to ensure this builtin is generated by the front end.

llvm-svn: 221988
2014-11-14 13:10:13 +00:00
Daniel Jasper 6c22c44e12 clang-format: Support assignments as conditional operands.
Before:
  return a != b
             // comment
             ? a
             : a = a != b
                   // comment
         ? a =
               b : a;
After:
  return a != b
             // comment
             ? a
             : a = a != b
                       // comment
                       ? a = b
                       : a;

llvm-svn: 221987
2014-11-14 13:03:40 +00:00
Daniel Jasper 119ff533e4 clang-format: Improve indentation of comments in expressions.
Before:
  int i = (a)
              // comment
          + b;
  return aaaa == bbbb
                 // comment
             ? aaaa
             : bbbb;
After:
  int i = (a)
          // comment
          + b;
  return aaaa == bbbb
             // comment
             ? aaaa
             : bbbb;

llvm-svn: 221985
2014-11-14 12:31:14 +00:00
Bill Schmidt cee13a2712 [PowerPC] Add VSX builtins for vec_div
This patch adds builtin support for xvdivdp and xvdivsp, along with a
new test case.  The builtins are accessed using vec_div in altivec.h.
Builtins are listed (mostly) alphabetically there, so inserting these
changed the line numbers for deprecation warnings tested in
test/Headers/altivec-intrin.c.

There is a companion patch for LLVM.

llvm-svn: 221984
2014-11-14 12:10:51 +00:00
Daniel Jasper 734d52b58b clang-format: [Java] Fix line break behavior of class declarations.
Change breaking preferences:
1. Break before "extends"
2. Break before "implements"
3. Break within the implements list.

llvm-svn: 221981
2014-11-14 10:15:56 +00:00
Daniel Jasper 09f6abe8d8 clang-format: [Java] Improve generic return type formatting.
Before:
  public<R> ArrayList<R> get() {

After:
  public <R> ArrayList<R> get() {

llvm-svn: 221979
2014-11-14 09:05:32 +00:00
Daniel Jasper 30a2406e65 clang-format: [Java] No altnerative operator names in Java.
Before:
  someObject.and ();

After:
  someObject.and();

llvm-svn: 221978
2014-11-14 09:02:28 +00:00
Daniel Jasper 61d81973c1 clang-format: [Java] Improve formatting of generics.
Before:
  Function < F, ? extends T > function;

After:
  Function<F, ? extends T> function;

llvm-svn: 221976
2014-11-14 08:22:46 +00:00
Alexey Bataev 9aba41c822 [OPENMP] Temporary fix for processing of global variables in loops.
Currently there is a bug in processing of global variables used as loop control variables in 'omp for/simd' constructs: these globals must be captured as private variables, but currently they are nor. This is a temporary bug fix for this problem until the correct solution is prepared. If a global var used as lcv without explicit mark as a private/linear/lastprivate the error message is emitted.

llvm-svn: 221970
2014-11-14 04:08:45 +00:00
Alexey Samsonov 4c12c6cf3b [Sanitizer] Refactor SanitizerArgs parsing in Driver.
Remove flag parsing details from the public header.
Use SanitizerSet to represent the set of enabled sanitizers.
Cleanup the implementation: update the comments to
reflect reality, remove dead code.

No functionality change.

llvm-svn: 221968
2014-11-14 02:59:20 +00:00
Reid Kleckner e070b99b84 Remove -fseh-exceptions in favor of checking the triple
This option was misleading because it looked like it enabled the
language feature of SEH (__try / __except), when this option was really
controlling which EH personality function to use. Mingw only supports
SEH and SjLj EH on x86_64, so we can simply do away with this flag.

llvm-svn: 221963
2014-11-14 02:01:10 +00:00
Alexey Samsonov 59f34bbb76 Cleanup SanitizerArgs: get rid of unused variable, make one method non-static. NFC.
llvm-svn: 221959
2014-11-14 00:46:39 +00:00
Richard Smith 6403e937d6 PR21565 Add an egregious hack to support broken libstdc++ headers that declare
a member named 'swap' and then expect unqualified lookup for the name 'swap' in
its exception specification to find anything else.

Without delay-parsed exception specifications, this was ill-formed (NDR) by
[basic.scope.class]p1, rule 2. With delay-parsed exception specifications, the
call to 'swap' unambiguously finds the function being declared, which then
fails because the arguments don't work for that function.

llvm-svn: 221955
2014-11-14 00:37:55 +00:00
Alexey Samsonov cbbd2fd8d6 [Profile] Always build profile runtime library with -fPIC.
This change removes libclang_rt.profile-pic-<arch>.a version of
profile runtime. Instead, it's sufficient to always build
libclang_rt.profile-<arch>.a with -fPIC, as it can be linked into
both executables and shared objects.

llvm-svn: 221952
2014-11-14 00:16:26 +00:00
Reid Kleckner 92493e5e96 -Wsentinel: Suggest nullptr in C++11 instead of NULL
llvm-svn: 221945
2014-11-13 23:19:36 +00:00
Richard Smith 98710fc4f5 Fix assert/crash on invalid with __builtin_constant_p conditionals in constant expressions.
llvm-svn: 221942
2014-11-13 23:03:19 +00:00
Fariborz Jahanian c62d16f304 Objective-C. Fixes a regression caused by implementation
of new warning for deprecated method call for receiver
of type 'id'. This addresses rdar://18960378 where
unintended warnings being issued.

llvm-svn: 221933
2014-11-13 22:27:05 +00:00
Richard Smith 0b3a46247e PR21437, final part of DR1330: delay-parsing of exception-specifications. This
is a re-commit of Doug's r154844 (modernized and updated to fit into current
Clang).

llvm-svn: 221918
2014-11-13 20:01:57 +00:00
Ed Maste 6a9eda5e3d Hook up FreeBSD AArch64 support
Patch from Andrew Turner.

llvm-svn: 221900
2014-11-13 16:55:42 +00:00
Nico Weber 34272657de clang-format: Format extern "C" blocks like namespace blocks.
namespace blocks act as if KeepEmptyLinesAtTheStartOfBlocks is always true,
and aren't collapsed to a single line even if they would fit. Do the same
for extern "C" blocks.

Before,

  extern "C" {

  void ExternCFunction();

  }

was collapsed into `extern "C" { void ExternCFunction(); }`. Now it stays like
it was.

Fixes http://crbug.com/432640 and part of PR21419.

llvm-svn: 221897
2014-11-13 16:25:37 +00:00
Daniel Jasper 6be0f55d44 clang-format: [Java] Support Java enums.
In Java, enums can contain a class body and enum constants can have
arguments as well as class bodies. Support most of that.

llvm-svn: 221895
2014-11-13 15:56:28 +00:00
Alexander Kornienko 254b7dba27 Support non-owned DiagnosticConsumer in SetupSerializedDiagnostics
This fixes an assertion when running clang-tidy on a file having
--serialize-diagnostics in compiler options. Committing a regression test
for clang-tidy separately.

Patch by Aaron Wishnick!

llvm-svn: 221884
2014-11-13 13:08:27 +00:00
Richard Smith 96d71c3936 PR19372: Keep checking template arguments after we see an argument pack
expansion into a parameter pack; we know that we're still filling in that
parameter's arguments. Previously, if we hit this case for an alias template,
we'd try to substitute using non-canonical template arguments.

llvm-svn: 221832
2014-11-12 23:38:38 +00:00
Anton Korobeynikov 50a3cbd7c0 Temporary revert r221818 until all the problems
with objc stuff will be resolved.

llvm-svn: 221829
2014-11-12 23:15:38 +00:00
Fariborz Jahanian 800821a3b2 [Objective-C++ IRGen] do not generate .cxx_construct
for class that contains trivially-constructible struct ivar.
rdar://18950072

llvm-svn: 221823
2014-11-12 22:37:43 +00:00
Anton Korobeynikov 0140aa8756 Fix fallout from r219557
Summary:
Consider the following nifty 1 liner: (0 ? csqrtl(2.0f) : sqrtl(2.0f)). One can easily obtain such code from e.g. tgmath. Right now it produces an assertion because we fail to do the promotion real => _Complex real.

The case was properly handled previously (old handleOtherComplexFloatConversion routine), but was forgotten in the current version. This seems to be about fallout from r219557

Reviewers: chandlerc, rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

llvm-svn: 221821
2014-11-12 22:19:06 +00:00
Reid Kleckner 6d829bdbef Fix brace init of unions with unnamed struct members
The check for unnamed members was intended to skip unnamed bitfields,
but it ended up skipping unnamed structs. This lead to an assertion in
IRGen.

llvm-svn: 221818
2014-11-12 21:30:23 +00:00
Richard Smith 38af8561f9 Update Clang's SD-6 support to match N4200 (except for __has_cpp_attribute,
which we don't yet implement).

llvm-svn: 221816
2014-11-12 21:16:38 +00:00
Kaelyn Takata 98a3ec010a Pass the filter function_ref by value now that r221753 fixes the bug
that was preventing pass-by-value from working correctly.

llvm-svn: 221803
2014-11-12 18:34:08 +00:00
Rafael Espindola fd832395b1 Update for llvm api change.
llvm-svn: 221786
2014-11-12 14:48:44 +00:00
Rafael Espindola af0e40ac0e Simplify code a bit by passing StreamFile to the BitstreamCursor constructor.
llvm-svn: 221784
2014-11-12 14:42:25 +00:00
Nico Weber 83a63877dc Mark TypeDecls used in explicit destructor calls as referenced.
Fixes PR21221. Patch by Axel Naumann, test by me.

llvm-svn: 221771
2014-11-12 04:33:52 +00:00
Bill Schmidt 9ec8cea02b [PowerPC] Add vec_vsx_ld and vec_vsx_st intrinsics
This patch enables the vec_vsx_ld and vec_vsx_st intrinsics for
PowerPC, which provide programmer access to the lxvd2x, lxvw4x,
stxvd2x, and stxvw4x instructions.

New code in altivec.h defines these in terms of new builtins, which
are themselves defined in BuiltinsPPC.def.  The builtins are converted
to LLVM intrinsics in CGBuiltin.cpp.  Additional code is added to
builtins-ppc-vsx.c to verify the correct generation of the intrinsics.

Note that I moved the other VSX builtins so all VSX builtins will be
alphabetical in their own section in BuiltinsPPC.def.

There is a companion patch for LLVM.

llvm-svn: 221768
2014-11-12 04:19:56 +00:00
Nico Weber 28309185b2 Mark TypeDecls used in member initializers as referenced.
Without this, -Wunused-local-typedef would incorrectly warn on the two typedefs
in this program:

void foo() {
  struct A {};
  struct B : public A {
    typedef A INHERITED;
    B() : INHERITED() {}

    typedef B SELF;
    B(int) : SELF() {}
  };
}

llvm-svn: 221765
2014-11-12 03:52:25 +00:00
Nico Weber aa0117c628 clang-format a few lines, fixes one 80col violation. nfc.
llvm-svn: 221764
2014-11-12 03:44:43 +00:00
Richard Smith 775118a28b Try a different workaround for GCC 4.7.2 lambda capture bug. The previous
workaround took us from wrong-code to ICE.

llvm-svn: 221754
2014-11-12 02:09:03 +00:00
Richard Smith 2e32155b58 Instantiate exception specifications when instantiating function types (other
than the type of a function declaration). We previously didn't instantiate
these at all! This also covers the pathological case where the only mention of
a parameter pack is within the exception specification; this gives us a second
way (other than alias templates) to reach the horrible state where a type
contains an unexpanded pack, but its canonical type does not.


This is a re-commit of r219977:

r219977 was reverted in r220038 because it hit a wrong-code bug in GCC 4.7.2.
(That's gcc.gnu.org/PR56135, and affects any implicit lambda-capture of
'this' within a template.)


r219977 was a re-commit of r217995, r218011, and r218053:

r217995 was reverted in r218058 because it hit a rejects-valid bug in MSVC.
(Incorrect overload resolution in the presence of using-declarations.)
It was re-committed in r219977 with a workaround for the MSVC rejects-valid.

r218011 was a workaround for an MSVC parser bug. (Incorrect desugaring of
unbraced range-based for loop).

llvm-svn: 221750
2014-11-12 02:00:47 +00:00
Richard Smith d8a52a7831 PR21536: Fix a corner case where we'd get confused by a pack expanding into the
penultimate parameter of a template parameter list, where the last parameter is
itself a pack, and build a bogus empty final pack argument.

llvm-svn: 221748
2014-11-12 01:43:45 +00:00
Richard Smith 17c00b4328 Fix this code to follow the coding style regarding anonymous namespaces and
static functions. Make a bunch of file-local functions static. Remove one
unused static function revealed by this.

llvm-svn: 221745
2014-11-12 01:24:00 +00:00
Kostya Serebryany 4133eabb45 [clang/asan] Do not emit memcpy for trivial operator= when -fsanitize-address-field-padding >= 1
Summary: If we've added poisoned paddings to a type do not emit memcpy for operator=.

Test Plan: regression tests.

Reviewers: majnemer, rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

llvm-svn: 221739
2014-11-11 23:38:13 +00:00
Kaelyn Takata 2e764b83aa Have LookupMemberExprInRecord only call CorrectTypoDelayed, dropping the
code for calling CorrectTypo.

Includes a needed fix for non-C++ code to not choke on TypoExprs (which
also resolves a TODO from r220698).

llvm-svn: 221736
2014-11-11 23:26:58 +00:00
Kaelyn Takata 49d84328d9 Create two helpers for running the typo-correction tree transform.
One takes an Expr* and the other is a simple wrapper that takes an
ExprResult instead, and handles checking whether the ExprResult is
invalid.

Additionally, allow an optional callback that is run on the full result
of the tree transform, for filtering potential corrections based on the
characteristics of the resulting expression once all of the typos have
been replaced.

llvm-svn: 221735
2014-11-11 23:26:56 +00:00
Kaelyn Takata 5c3dc4be08 Replace MemberTypoDiags and MemberExprTypoRecovery with lambdas.
llvm-svn: 221734
2014-11-11 23:26:54 +00:00
Daniel Jasper 3eb341c478 clang-format: Improve handling of comments in binary expressions.
Before:
  b = a &&
      // Comment
      b.c &&
      d;

After:
  b = a &&
      // Comment
      b.c && d;

This fixes llvm.org/PR21535.

llvm-svn: 221727
2014-11-11 23:04:51 +00:00
Kaelyn Takata fc8c61a5b8 Make LookupResult be copyable to avoid decomposing an existing one and
initializing a new one every time a copy is needed.

llvm-svn: 221724
2014-11-11 23:00:42 +00:00
Kaelyn Takata e9e4ecfe9e Explicitly exclude keywords from the member validator.
Also simply and remove dead code from MemberExprTypoRecovery.

llvm-svn: 221723
2014-11-11 23:00:40 +00:00
Kaelyn Takata db99de2d15 Fix some formatting prior to refactoring the code.
llvm-svn: 221722
2014-11-11 23:00:38 +00:00
Kostya Serebryany 75b4f9e1e6 Introduce -fsanitize-coverage=N flag
Summary:
This change makes the asan-coverge (formerly -mllvm -asan-coverge)
accessible via a clang flag.
Companion patch to LLVM is http://reviews.llvm.org/D6152

Test Plan: regression tests, chromium

Reviewers: samsonov

Reviewed By: samsonov

Subscribers: cfe-commits

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

llvm-svn: 221719
2014-11-11 22:15:07 +00:00
Alexey Samsonov e396bfc064 Bundle conditions checked by UBSan with sanitizer kinds they implement.
Summary:
This change makes CodeGenFunction::EmitCheck() take several
conditions that needs to be checked (all of them need to be true),
together with sanitizer kinds these checks are for. This would allow
to split one call into UBSan runtime into several calls in case
different sanitizer kinds would have different recoverability
settings.

Tests should be fixed accordingly, I'm working on it.

Test Plan: regression test suite.

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

llvm-svn: 221716
2014-11-11 22:03:54 +00:00
Fariborz Jahanian 3365bfc609 Revert r221702 until I address Richard Trieu's
comments.

llvm-svn: 221714
2014-11-11 21:54:19 +00:00
Duncan P. N. Exon Smith 2b1f278e77 Revert "IR: MDNode => Value: Update for LLVM API change in r221375"
This reverts commit r221376.

The API change was reverted in r221711.

llvm-svn: 221712
2014-11-11 21:31:03 +00:00
David Blaikie 42edade9d9 PR16091 continued: Debug Info for member functions with undeduced return types.
So DWARF5 specs out auto deduced return types as DW_TAG_unspecified_type
with DW_AT_name "auto", and GCC implements this somewhat, but it
presents a few problems to do this with Clang.

GCC's implementation only applies to member functions where the auto
return type isn't deduced immediately (ie: member functions of templates
or member functions defined out of line). In the common case of an
inline deduced return type function, GCC emits the DW_AT_type as the
deduced return type.

Currently GDB doesn't seem to behave too well with this debug info - it
treats the return type as 'void', even though the definition of the
function has the correctly deduced return type (I guess it sees the
return type the declaration has, doesn't understand it, and assumes
void). This means the function's ABI might be broken (non-trivial return
types, etc), etc.

Clang, on the other hand doesn't track this particular case of a
deducable return type that is deduced immediately versus one that is
deduced 'later'. So if we implement the DWARF5 representation, all
deducible return type functions would get adverse GDB behavior
(including deduced return type lambda functions, inline deduced return
type functions, etc).

Also, we can't just do this for auto types that are not deduced -
because Clang marks even the declaration's return type as deduced (&
provides the underlying type) once a definition is seen that allows the
deduction. So we have to ignore even deduced types - but we can't do
that for auto variables (because this representation only applies to
function declarations - variables and function definitions need the real
type so the function can be called, etc) so we'd need to add an extra
flag to the type unwrapping/creation code to indicate when we want to
see through deduced types and when we don't. It's also not as simple as
just checking at the top level when building a function type (for one
thing, we reuse the function type building for building function pointer
types which might also have 'auto' in them - but be the type of a
variable instead) because the auto might be arbitrarily deeply nested
("auto &", "auto (*)()", etc...)

So, with all that said, let's do the simple thing that works in existing
debuggers for now and treat these functions the same way we do function
templates and implicit special members: omit them from the member list,
since they can't be correctly called anyway (without knowing the return
type the ABI isn't know and a function call could put the arguments in
the wrong place) so they're not much use to the user.

At some point in the future, when GDB understands the DWARF5
representation better it might be worth plumbing through the extra type
builder handling to avoid looking through AutoType for some callers,
etc...

llvm-svn: 221704
2014-11-11 20:44:45 +00:00
Fariborz Jahanian c5fd4844da Patch to warn when logical evaluation of operand evalutes to a true value;
That this is a c-only patch. c++ already has this warning.
This addresses rdar://18716393

llvm-svn: 221702
2014-11-11 19:59:16 +00:00
Daniel Jasper 64a328e96f clang-format: Preserve trailing-comma logic even with comments.
Before:
  vector<int> SomeVector = {// aaa
                            1, 2,
  };

After:
  vector<int> SomeVector = {
      // aaa
      1, 2,
  };

llvm-svn: 221699
2014-11-11 19:34:57 +00:00
Richard Smith 57e18ac96d First half of CWG1962: decltype(__func__) should not be a reference type,
because __func__ is supposed to act like a local static variable.

llvm-svn: 221698
2014-11-11 19:30:41 +00:00
Fariborz Jahanian a29986c0b0 This patch fixes a crash after rebuilding call AST of
an __unknown_anytype(...). In this case, we rebuild the
vararg function type specially to convert the call expression
to  something that IRGen can handle. However, FunctionDecl
as rebuilt in RebuildUnknownAnyExpr::resolveDecl is bogus and
results in crash when accessing its params later on. This
patch fixes the crash by rebuilding the FunctionDecl to match
its new resolved type. rdar://15297105.
(patch reapplied after lldb issue was fixed in r221660).

llvm-svn: 221691
2014-11-11 16:56:21 +00:00
NAKAMURA Takumi cdcbfba3b6 CGOpenMPRuntime.h: Fix a couple of \param(s) introduced in r221663. [-Wdocumentation]
llvm-svn: 221676
2014-11-11 07:58:06 +00:00
Alexey Bataev 9772000a22 [OPENMP] Codegen for threadprivate variables
For all threadprivate variables which have constructor/destructor emit call to void __kmpc_threadprivate_register(ident_t * <Current Location>, void *<Original Global Addr>, kmpc_ctor <Constructor>, kmpc_cctor NULL, kmpc_dtor <Destructor>); 
In expressions all references to such variables are replaced by calls to void *__kmpc_threadprivate_cached(ident_t *<Current Location>, kmp_int32 <Current Thread Id>, void *<Original Global Addr>, size_t <Size of Data>, void ***<Pointer to autogenerated cache – array of private copies of threadprivate variable>);
Test test/OpenMP/threadprivate_codegen.cpp checks that codegen is correct. Also it checks that codegen is correct after serialization/deserialization and one of passes verifies debug info.
Differential Revision: http://reviews.llvm.org/D4002

llvm-svn: 221663
2014-11-11 04:05:39 +00:00
Richard Smith ea97e36dfc Fix parsing of fold-expressions within a cast expression. We parse the
parenthesized expression a bit differently in this case, just in case the
commas have special meaning.

llvm-svn: 221661
2014-11-11 03:28:50 +00:00
Justin Bogner 4cb85f36ca InstrProf: Remove an unnecessary helper function (NFC)
VisitSubStmtRBraceState is really just Visit, as long as
VisitCompoundStatement handles braces correctly.

llvm-svn: 221659
2014-11-11 02:47:05 +00:00