]> granicus.if.org Git - clang/log
clang
10 years agoclang-cl /fallback: turn the note into a warning
Hans Wennborg [Wed, 19 Feb 2014 02:10:19 +0000 (02:10 +0000)]
clang-cl /fallback: turn the note into a warning

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

10 years agoRemove a C++11ism.
Richard Smith [Wed, 19 Feb 2014 01:08:24 +0000 (01:08 +0000)]
Remove a C++11ism.

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

10 years agoPR13110: Add a -Wignored-qualifiers warning when ignoring a const, volatile, or
Richard Smith [Wed, 19 Feb 2014 00:13:27 +0000 (00:13 +0000)]
PR13110: Add a -Wignored-qualifiers warning when ignoring a const, volatile, or
_Atomic qualifier applied to a reference type.

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

10 years agoInitial implementation of virtual file system
Ben Langmuir [Wed, 19 Feb 2014 00:10:30 +0000 (00:10 +0000)]
Initial implementation of virtual file system

This adds the minimum virtual file system support to start migrating
FileManager onto the VFS.

Originally discussed here:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-February/035188.html

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

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

10 years agoAdd missing test file for r201615
Reid Kleckner [Tue, 18 Feb 2014 23:57:59 +0000 (23:57 +0000)]
Add missing test file for r201615

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

10 years agoFix false positives in -Wmsvc-include by continuing header search
Reid Kleckner [Tue, 18 Feb 2014 23:49:24 +0000 (23:49 +0000)]
Fix false positives in -Wmsvc-include by continuing header search

This makes Clang and LLVM -Wmsvc-include clean.

I believe the correct behavior here is to avoid updating the cache when
we find the header via MSVC's search rules.

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

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

10 years agoFix the Driver/cl-fallback.c test
Hans Wennborg [Tue, 18 Feb 2014 23:25:20 +0000 (23:25 +0000)]
Fix the Driver/cl-fallback.c test

On machines that have cl.exe on PATH, the note will print the full path.

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

10 years agoMS ABI: Remove nv adjustment from direct vdtor calls and prologues
Reid Kleckner [Tue, 18 Feb 2014 22:51:52 +0000 (22:51 +0000)]
MS ABI: Remove nv adjustment from direct vdtor calls and prologues

Summary:
Generally the vector deleting dtor, which we model as a vtable thunk,
takes care of non-virtual adjustment and delegates to the other
destructor variants.  The other non-complete destructor variants assume
that 'this' on entry points to the virtual base subobject that first
declared the virtual destructor.

We need to change the adjustment in both the prologue and the vdtor call
setup.

Reviewers: timurrrr

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

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

10 years agoMore tests for r201536.
Richard Smith [Tue, 18 Feb 2014 22:47:10 +0000 (22:47 +0000)]
More tests for r201536.

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

10 years agoExperiment with making -Wunreachable-code more immediately useful by restricting...
Ted Kremenek [Tue, 18 Feb 2014 22:12:10 +0000 (22:12 +0000)]
Experiment with making -Wunreachable-code more immediately useful by restricting warnings to those issued in the main file.

This warning has a whole bunch of known false positives, much of them due
to code that is "sometimes unreachable".  This can caused by code that
is conditionally generated by the preprocessor, branches that are defined
in terms of architecture-specific details (e.g., the size of a type), and
so on.  While these are all good things to address one by one, the reality
is that this warning has received little love lately.  By restricting
its purvue, we can focus on the top issues effecting main files, which
should be smaller, and then gradually widen the scope.

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

10 years agoclang-cl /fallback: emit a note when falling back
Hans Wennborg [Tue, 18 Feb 2014 21:42:51 +0000 (21:42 +0000)]
clang-cl /fallback: emit a note when falling back

This makes it a lot easier to see what's going on from the output.

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

10 years agoDebugInfo: Avoid unnecessarily looking up the context when the declaration is already...
David Blaikie [Tue, 18 Feb 2014 20:52:05 +0000 (20:52 +0000)]
DebugInfo: Avoid unnecessarily looking up the context when the declaration is already built.

No functional change intended.

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

10 years agoUpdated documentation for Thread Safety Analysis.
DeLesley Hutchins [Tue, 18 Feb 2014 19:42:01 +0000 (19:42 +0000)]
Updated documentation for Thread Safety Analysis.

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

10 years agoclang-cl: support -v
Hans Wennborg [Tue, 18 Feb 2014 19:29:31 +0000 (19:29 +0000)]
clang-cl: support -v

It doesn't conflict with any cl.exe options and it's useful for debugging.

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

10 years agoFix testcase to actually check what it was supposed to, and make it a bit more robust.
Richard Smith [Tue, 18 Feb 2014 18:35:57 +0000 (18:35 +0000)]
Fix testcase to actually check what it was supposed to, and make it a bit more robust.

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

10 years agoAttempting to fix the build bot due to some missing text in the ast dump.
Aaron Ballman [Tue, 18 Feb 2014 17:56:41 +0000 (17:56 +0000)]
Attempting to fix the build bot due to some missing text in the ast dump.

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

10 years agoclang-cl: Parse the /d2Zi+ flag (PR18728)
Hans Wennborg [Tue, 18 Feb 2014 17:49:01 +0000 (17:49 +0000)]
clang-cl: Parse the /d2Zi+ flag (PR18728)

This is an undocumented, but reportedly widely used flag.
We don't support it, but should be able to parse it.

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

10 years agoMissed updating this test case with r201585 -- the lockable attribute is now internal...
Aaron Ballman [Tue, 18 Feb 2014 17:46:17 +0000 (17:46 +0000)]
Missed updating this test case with r201585 -- the lockable attribute is now internally represented by CapabilityAttr.

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

10 years agoIn some cases (for example, the Firefox build system), the CLANG_CXX variable is...
Sylvestre Ledru [Tue, 18 Feb 2014 17:45:06 +0000 (17:45 +0000)]
In some cases (for example, the Firefox build system), the CLANG_CXX variable is defined but empty.
Extend the test (like it is done in scan-build) to check also if the variable
is empty or not.

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

10 years agoDeLesley Hutchins (who wrote the original thread-safety attribute functionality)...
Aaron Ballman [Tue, 18 Feb 2014 17:36:50 +0000 (17:36 +0000)]
DeLesley Hutchins (who wrote the original thread-safety attribute functionality) and I have agreed to start migrating from lock-specific terminology to "capability"-specific terminology. This opens the door for future threading-related analysis passes so that a common nomenclature can be used.

The following attributes have been (silently) deprecated, with their replacements listed:

lockable => capability
exclusive_locks_required => requires_capability
shared_locks_required => requires_shared_capability
locks_excluded => requires_capability

There are no functional changes intended.

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

10 years agoRemove trailing spaces (no other change). Bikeshed #2
Sylvestre Ledru [Tue, 18 Feb 2014 17:21:45 +0000 (17:21 +0000)]
Remove trailing spaces (no other change). Bikeshed #2

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

10 years ago[analyzer] Teach CastSizeChecker about flexible array members.
Jordan Rose [Tue, 18 Feb 2014 17:06:30 +0000 (17:06 +0000)]
[analyzer] Teach CastSizeChecker about flexible array members.

...as well as fake flexible array members: structs that end in arrays with
length 0 or 1.

Patch by Daniel Fahlgren!

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

10 years agoAdd files that I forgot to svn add in 201578.
Dmitri Gribenko [Tue, 18 Feb 2014 15:29:17 +0000 (15:29 +0000)]
Add files that I forgot to svn add in 201578.

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

10 years agolibclang: fix a bug in processing invalid arguments, introduced in r201249
Dmitri Gribenko [Tue, 18 Feb 2014 15:20:02 +0000 (15:20 +0000)]
libclang: fix a bug in processing invalid arguments, introduced in r201249

Recommit r201346, reverted in r201373.

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

10 years agoMS ABI: Refactor extended qualifiers
David Majnemer [Tue, 18 Feb 2014 14:20:10 +0000 (14:20 +0000)]
MS ABI: Refactor extended qualifiers

Extended qualifiers can appear in many places, refactor the code so it's
more reusable.  Add tests in areas where we've increased compatibility.

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

10 years agoRemove trailing spaces (no other change)
Sylvestre Ledru [Tue, 18 Feb 2014 12:59:51 +0000 (12:59 +0000)]
Remove trailing spaces (no other change)

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

10 years agoMS ABI: Add support for mangling __restrict
David Majnemer [Tue, 18 Feb 2014 12:58:35 +0000 (12:58 +0000)]
MS ABI: Add support for mangling __restrict

Pointer types in the MSVC ABI are a bit awkward, the width of the
pointer is considered a kind of CVR qualifier.

Restrict is handled similarly to const and volatile but is mangled after
the pointer width qualifier.

This fixes PR18880.

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

10 years agoPR18876: The special-case rule that ignores the destruction of a top-level
Richard Smith [Tue, 18 Feb 2014 03:51:47 +0000 (03:51 +0000)]
PR18876: The special-case rule that ignores the destruction of a top-level
temporary in a decltype expression only applies if that temporary was created
by a function call, not by a function-style cast or other flavour of
expression.

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

10 years agoFix a non-error diagnostic that had an err_ name. Also move it from Warning to
Richard Smith [Tue, 18 Feb 2014 00:45:50 +0000 (00:45 +0000)]
Fix a non-error diagnostic that had an err_ name. Also move it from Warning to
ExtWarn, since it's an extension.

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

10 years agoPR18839: 'extern "C++"' also adds an implicit 'extern', not just 'extern "C"'.
Richard Smith [Mon, 17 Feb 2014 23:34:47 +0000 (23:34 +0000)]
PR18839: 'extern "C++"' also adds an implicit 'extern', not just 'extern "C"'.

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

10 years agoPR18870: Parse language linkage specifiers properly if the string-literal is
Richard Smith [Mon, 17 Feb 2014 23:25:27 +0000 (23:25 +0000)]
PR18870: Parse language linkage specifiers properly if the string-literal is
spelled in an interesting way.

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

10 years agoPR18855: Add support for UCNs and UTF-8 encoding within ud-suffixes.
Richard Smith [Mon, 17 Feb 2014 21:52:30 +0000 (21:52 +0000)]
PR18855: Add support for UCNs and UTF-8 encoding within ud-suffixes.

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

10 years agoChange PGO instrumentation to compute counts in a separate AST traversal.
Bob Wilson [Mon, 17 Feb 2014 19:21:09 +0000 (19:21 +0000)]
Change PGO instrumentation to compute counts in a separate AST traversal.

Previously, we made one traversal of the AST prior to codegen to assign
counters to the ASTs and then propagated the count values during codegen. This
patch now adds a separate AST traversal prior to codegen for the
-fprofile-instr-use option to propagate the count values. The counts are then
saved in a map from which they can be retrieved during codegen.

This new approach has several advantages:

1. It gets rid of a lot of extra PGO-related code that had previously been
added to codegen.

2. It fixes a serious bug. My original implementation (which was mailed to the
list but never committed) used 3 counters for every loop. Justin improved it to
move 2 of those counters into the less-frequently executed breaks and continues,
but that turned out to produce wrong count values in some cases. The solution
requires visiting a loop body before the condition so that the count for the
condition properly includes the break and continue counts. Changing codegen to
visit a loop body first would be a fairly invasive change, but with a separate
AST traversal, it is easy to control the order of traversal. I've added a
testcase (provided by Justin) to make sure this works correctly.

3. It improves the instrumentation overhead, reducing the number of counters for
a loop from 3 to 1. We no longer need dedicated counters for breaks and
continues, since we can just use the propagated count values when visiting
breaks and continues.

To make this work, I needed to make a change to the way we count case
statements, going back to my original approach of not including the fall-through
in the counter values. This was necessary because there isn't always an AST node
that can be used to record the fall-through count. Now case statements are
handled the same as default statements, with the fall-through paths branching
over the counter increments.  While I was at it, I also went back to using this
approach for do-loops -- omitting the fall-through count into the loop body
simplifies some of the calculations and make them behave the same as other
loops. Whenever we start using this instrumentation for coverage, we'll need
to add the fall-through counts into the counter values.

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

10 years agoSome nitpicky comment fixes for "i.e." and "e.g." abbreviations.
Bob Wilson [Mon, 17 Feb 2014 19:21:03 +0000 (19:21 +0000)]
Some nitpicky comment fixes for "i.e." and "e.g." abbreviations.

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

10 years agoFix some minor whitespace issues.
Bob Wilson [Mon, 17 Feb 2014 19:20:59 +0000 (19:20 +0000)]
Fix some minor whitespace issues.

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

10 years ago[analyzer] Improved checker naming in CFG dump.
Anton Yartsev [Mon, 17 Feb 2014 18:25:34 +0000 (18:25 +0000)]
[analyzer] Improved checker naming in CFG dump.

This implements FIXME from Checker.cpp (FIXME: We want to return the package + name of the checker here.) and replaces hardcoded checker names with the new ones obtained via getCheckName().getName().

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

10 years agoForcing it to be an error when there is no Documentation list specified for an attrib...
Aaron Ballman [Mon, 17 Feb 2014 18:23:02 +0000 (18:23 +0000)]
Forcing it to be an error when there is no Documentation list specified for an attribute. This is a bit of a (harmless) hack, but the FIXME explains why and when this hack can be removed. It's a justified hack because this prevents attribute authors from forgetting to add documentation when they add a new attribute.

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

10 years agoRevert "Debug info: Make DWARF4 the default for Darwin, too."
Adrian Prantl [Mon, 17 Feb 2014 17:40:52 +0000 (17:40 +0000)]
Revert "Debug info: Make DWARF4 the default for Darwin, too."

I'm holding this change to give maintainers of Darwin buildbots more time
to update their toolchains.

This reverts commit r201375.

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

10 years agoThe default assignment operator could not be generated by all of the bots, but it...
Aaron Ballman [Mon, 17 Feb 2014 16:18:32 +0000 (16:18 +0000)]
The default assignment operator could not be generated by all of the bots, but it's required by std::vector to operate properly.

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

10 years agoRemoving a C++11'ism to also fix the build bots.
Aaron Ballman [Mon, 17 Feb 2014 15:59:37 +0000 (15:59 +0000)]
Removing a C++11'ism to also fix the build bots.

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

10 years agoFixing build bot breakage due to using a local type as a template argument.
Aaron Ballman [Mon, 17 Feb 2014 15:36:08 +0000 (15:36 +0000)]
Fixing build bot breakage due to using a local type as a template argument.

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

10 years agoImplements a declarative approach to documenting individual attributes in Clang via...
Aaron Ballman [Mon, 17 Feb 2014 15:27:10 +0000 (15:27 +0000)]
Implements a declarative approach to documenting individual attributes in Clang via a Documentation tablegen class. Also updates the internals manual with information about how to use this new, required, documentation feature.

This patch adds some very, very sparse initial documentation for some attributes. Additional effort from attribute authors is greatly appreciated.

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

10 years agoFix gcc warning about C++ style comments.
Patrik Hagglund [Mon, 17 Feb 2014 11:54:08 +0000 (11:54 +0000)]
Fix gcc warning about C++ style comments.

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

10 years agoDarwin: remove buggy assertion
Tim Northover [Mon, 17 Feb 2014 11:12:04 +0000 (11:12 +0000)]
Darwin: remove buggy assertion

We later emit a proper error in the situations where this would trigger, so
there's no need to check.

rdar://problem/16040604

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

10 years agoclang-format: Don't wrap "const" etc. of function declarations.
Daniel Jasper [Mon, 17 Feb 2014 07:57:46 +0000 (07:57 +0000)]
clang-format: Don't wrap "const" etc. of function declarations.

Generally people seem to prefer wrapping the first function parameter
over wrapping the trailing tokens "const", "override" and "final". This
does not extend to function-like annotations and probably not to other
non-standard annotations.

Before:
  void someLongFunction(int SomeLongParameter)
      const { ... }

After:
  void someLongFunction(
      int SomeLongParameter) const { ... }

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

10 years agoclang/unittests/AST,ASTMatchers: Remove _MSC_VER.
NAKAMURA Takumi [Sun, 16 Feb 2014 10:16:09 +0000 (10:16 +0000)]
clang/unittests/AST,ASTMatchers: Remove _MSC_VER.

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

10 years agocheck-clang: Introduce the feature "non-ms-sdk" to suppress Driver/nostdincxx.cpp...
NAKAMURA Takumi [Sun, 16 Feb 2014 10:15:57 +0000 (10:15 +0000)]
check-clang: Introduce the feature "non-ms-sdk" to suppress Driver/nostdincxx.cpp on msvc.

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

10 years agocheck-clang: Introduce the feature "dw2" to suppress CodeGenCXX/debug-info-namespace...
NAKAMURA Takumi [Sun, 16 Feb 2014 10:15:46 +0000 (10:15 +0000)]
check-clang: Introduce the feature "dw2" to suppress CodeGenCXX/debug-info-namespace.cpp with *-win32.

FIXME: Could we add itanium triple here?

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

10 years agoIntroduce the feature "can-remove-opened-file" to suppress tests. [PR18856]
NAKAMURA Takumi [Sun, 16 Feb 2014 10:15:34 +0000 (10:15 +0000)]
Introduce the feature "can-remove-opened-file" to suppress tests. [PR18856]

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

10 years agoUse -target instead of ignored -arch to fix x86_64 builders
Nico Rieck [Sun, 16 Feb 2014 08:18:13 +0000 (08:18 +0000)]
Use -target instead of ignored -arch to fix x86_64 builders

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

10 years agoRemove useless XPASS
Nico Rieck [Sun, 16 Feb 2014 07:29:55 +0000 (07:29 +0000)]
Remove useless XPASS

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

10 years agoFix broken CHECK lines
Nico Rieck [Sun, 16 Feb 2014 07:29:41 +0000 (07:29 +0000)]
Fix broken CHECK lines

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

10 years agoFileCheck's -LABEL cannot be combined with -NOT or -DAG
Nico Rieck [Sun, 16 Feb 2014 07:28:50 +0000 (07:28 +0000)]
FileCheck's -LABEL cannot be combined with -NOT or -DAG

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

10 years agoFix broken RUN lines
Nico Rieck [Sun, 16 Feb 2014 07:28:32 +0000 (07:28 +0000)]
Fix broken RUN lines

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

10 years agoDebugInfo: imported_decl/using declarations at namespace scope
David Blaikie [Sat, 15 Feb 2014 21:03:07 +0000 (21:03 +0000)]
DebugInfo: imported_decl/using declarations at namespace scope

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

10 years ago[Sema] Fix assertion hit while trying to do constant evaluation for a dependent expre...
Argyrios Kyrtzidis [Sat, 15 Feb 2014 18:53:57 +0000 (18:53 +0000)]
[Sema] Fix assertion hit while trying to do constant evaluation for a dependent expression
inside a GNU statement expression.

rdar://16064952

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

10 years agoMS ABI: Remove a useless FileCheck line
David Majnemer [Sat, 15 Feb 2014 07:02:11 +0000 (07:02 +0000)]
MS ABI: Remove a useless FileCheck line

1. CHECK-NOT-LABEL is not valid FileCheck.
2. This test would not trigger the CHECK-NOT-LABEL even if 'interface' is
   replaced with 'struct'.

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

10 years agoMove test inputs into the Inputs directory (improvement/fix to r201419)
David Blaikie [Sat, 15 Feb 2014 05:09:38 +0000 (05:09 +0000)]
Move test inputs into the Inputs directory (improvement/fix to r201419)

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

10 years agoPGO: fix a bug in parsing pgo data.
Manman Ren [Sat, 15 Feb 2014 01:29:02 +0000 (01:29 +0000)]
PGO: fix a bug in parsing pgo data.

When a function has a single counter, we will offset the pointer by 1 when
parsing the next function. If a function has multiple counters, we are
okay after skipping rest of the counters.

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

10 years agoMS ABI: Fix some layout tests
David Majnemer [Sat, 15 Feb 2014 01:21:20 +0000 (01:21 +0000)]
MS ABI: Fix some layout tests

Some lines intended to be used for testing x86_64 ABI compatibility were
not firing because lines were annotated with the wrong FileCheck prefix:
X64 vs 64

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

10 years agoMS ABI: Fix some layout tests
David Majnemer [Sat, 15 Feb 2014 01:09:56 +0000 (01:09 +0000)]
MS ABI: Fix some layout tests

Some lines intended to be used for testing x86_64 ABI compatibility were
not firing because lines were annotated with the wrong FileCheck prefix:
X64 vs C64

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

10 years agoRemove transactional memory from c++ status page; there's no working paper for it...
Richard Smith [Sat, 15 Feb 2014 00:48:38 +0000 (00:48 +0000)]
Remove transactional memory from c++ status page; there's no working paper for it yet.

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

10 years agoAdd some missing threes.
Richard Smith [Sat, 15 Feb 2014 00:29:44 +0000 (00:29 +0000)]
Add some missing threes.

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

10 years agoAdd entries to C++ status page for Technical Specification Working Papers that
Richard Smith [Sat, 15 Feb 2014 00:29:00 +0000 (00:29 +0000)]
Add entries to C++ status page for Technical Specification Working Papers that
WG21 is about to vote on.

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

10 years ago[Objective-C Sema]. Warn when an indirectly overridden property
Fariborz Jahanian [Sat, 15 Feb 2014 00:04:36 +0000 (00:04 +0000)]
[Objective-C Sema]. Warn when an indirectly overridden property
mismatches the one declared in current class; in addition to
those that are directly overridden.
// rdar://15967517

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

10 years agoFix crash-on-invalid if decltype(auto) is used as a deduced return type in
Richard Smith [Fri, 14 Feb 2014 22:17:32 +0000 (22:17 +0000)]
Fix crash-on-invalid if decltype(auto) is used as a deduced return type in
C++11 mode. Continue to disallow return type deduction in C++11 for now.

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

10 years agoConsistently print anonymous namespace names as "<anonymous namespace>"
David Blaikie [Fri, 14 Feb 2014 22:12:54 +0000 (22:12 +0000)]
Consistently print anonymous namespace names as "<anonymous namespace>"

For some reason we have two bits of code handling this printing:

lib/AST/Decl.cpp:        OS << "<anonymous namespace>";
lib/AST/TypePrinter.cpp:      OS << "<anonymous namespace>::";

it would be nice if we only had one...

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

10 years agoPrint anonymous namespaces as <anonymous namespace> instead of <anonymous>
David Blaikie [Fri, 14 Feb 2014 22:12:51 +0000 (22:12 +0000)]
Print anonymous namespaces as <anonymous namespace> instead of <anonymous>

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

10 years ago[IRGen]. Fixes a crash in using Objective-C array
Fariborz Jahanian [Fri, 14 Feb 2014 19:37:25 +0000 (19:37 +0000)]
[IRGen]. Fixes a crash in using Objective-C array
properties by fixing shouldBindAsLValue to accept arrays
(like record types) because we always manipulate
them in memory. Patch suggested by John MaCall.
// rdar://15610943

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

10 years agoclang-format: Fix formatting of class template declaration.
Daniel Jasper [Fri, 14 Feb 2014 18:22:40 +0000 (18:22 +0000)]
clang-format: Fix formatting of class template declaration.

Before:
  template <class R, class C>
  struct Aaaaaaaaaaaaaaaaa<R (C::*)(int)
                           const> : Aaaaaaaaaaaaaaaaa<R (C::*)(int)> {};

After:
  template <class R, class C>
  struct Aaaaaaaaaaaaaaaaa<R (C::*)(int) const>
      : Aaaaaaaaaaaaaaaaa<R (C::*)(int)> {};

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

10 years agoIf the headermap maps the filename to a framework include ("Foo.h" -> "Foo/Foo.h"),
Argyrios Kyrtzidis [Fri, 14 Feb 2014 14:58:28 +0000 (14:58 +0000)]
If the headermap maps the filename to a framework include ("Foo.h" -> "Foo/Foo.h"),
continue header lookup using the framework include as filename.

This allows us to conveniently treat
  #import "Foo.h"
as an implicit module import if we can resolve "Foo/Foo.h" as such.

rdar://16042979

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

10 years agoEnable generation of unwind tables when building with sanitizers.
Evgeniy Stepanov [Fri, 14 Feb 2014 08:56:25 +0000 (08:56 +0000)]
Enable generation of unwind tables when building with sanitizers.

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

10 years agoEnable AArch64 NEON by default.
Jiangning Liu [Fri, 14 Feb 2014 04:37:46 +0000 (04:37 +0000)]
Enable AArch64 NEON by default.

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

10 years agoAdd a command line option -gdwarf-aranges that will turn on emitting
Eric Christopher [Fri, 14 Feb 2014 01:27:03 +0000 (01:27 +0000)]
Add a command line option -gdwarf-aranges that will turn on emitting
the dwarf .debug_aranges section.

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

10 years agoDebug info: Make DWARF4 the default for Darwin, too.
Adrian Prantl [Fri, 14 Feb 2014 00:29:33 +0000 (00:29 +0000)]
Debug info: Make DWARF4 the default for Darwin, too.

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

10 years agoRevert "[CMake] Disable libclangTests.exe on win32 for now."
Juergen Ributzka [Thu, 13 Feb 2014 23:51:55 +0000 (23:51 +0000)]
Revert "[CMake] Disable libclangTests.exe on win32 for now."

Because I also reverted the original commit that required this change.

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

10 years agoRevert "libclang: fix a bug in processing invalid arguments, introduced in r201249,"
Juergen Ributzka [Thu, 13 Feb 2014 23:34:54 +0000 (23:34 +0000)]
Revert "libclang: fix a bug in processing invalid arguments, introduced in r201249,"

Reverting commit (201346) for now, because it is breaking our internal builds.

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

10 years agoEnable correcting a member declaration where the type is class template,
Kaelyn Uhrain [Thu, 13 Feb 2014 20:14:07 +0000 (20:14 +0000)]
Enable correcting a member declaration where the type is class template,
and the class name is shadowed by another member. Recovery still needs
to be figured out, which is non-trivial since the parser has already gone
down a much different path than if it had recognized the class template
as type instead of seeing the member that shadowed the class template.

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

10 years ago[examples] Add tablegen'd ClangCommentCommandList as a dependency for plugins.
Jordan Rose [Thu, 13 Feb 2014 18:12:30 +0000 (18:12 +0000)]
[examples] Add tablegen'd ClangCommentCommandList as a dependency for plugins.

Also, remove library dependencies for the sample analyzer-plugin. The only
library changes that would require a rebuild should be in headers, which
should already implicitly be marked as dependencies.

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

10 years ago[CMake] Disable libclangTests.exe on win32 for now.
NAKAMURA Takumi [Thu, 13 Feb 2014 17:51:35 +0000 (17:51 +0000)]
[CMake] Disable libclangTests.exe on win32 for now.

libclangTests.exe cannot find libclang.dll since it is not on $PATH.

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

10 years agolibclang: fix a bug in processing invalid arguments, introduced in r201249,
Dmitri Gribenko [Thu, 13 Feb 2014 16:51:38 +0000 (16:51 +0000)]
libclang: fix a bug in processing invalid arguments, introduced in r201249,
pointed out by Daniel Jasper in r201329

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

10 years agoRe-commit: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTe...
Daniel Sanders [Thu, 13 Feb 2014 14:44:26 +0000 (14:44 +0000)]
Re-commit: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call

Summary:
AsmPrinter::EmitInlineAsm() will no longer use the EmitRawText() call for
targets with mature MC support. Such targets will always parse the inline
assembly (even when emitting assembly). Targets without mature MC support
continue to use EmitRawText() for assembly output.

The hasRawTextSupport() check in AsmPrinter::EmitInlineAsm() has been replaced
with MCAsmInfo::UseIntegratedAs which when true, causes the integrated assembler
to parse inline assembly (even when emitting assembly output). UseIntegratedAs
is set to true for targets that consider any failure to parse valid assembly
to be a bug. Target specific subclasses generally enable the integrated
assembler in their constructor. The default value can be overridden with
-no-integrated-as.

All tests that rely on inline assembly supporting invalid assembly (for example,
those that use mnemonics such as 'foo' or 'hello world') have been updated to
disable the integrated assembler.

Changes since review (and last commit attempt):
- Fixed test failures that were missed due to configuration of local build.
  (fixes crash.ll and a couple others).
- Fixed tests that happened to pass because the local build was on X86
  (should fix 2007-12-17-InvokeAsm.ll)
- mature-mc-support.ll's should no longer require all targets to be compiled.
  (should fix ARM and PPC buildbots)
- Object output (-filetype=obj and similar) now forces the integrated assembler
  to be enabled regardless of default setting or -no-integrated-as.
  (should fix SystemZ buildbots)

Reviewers: rafael

Reviewed By: rafael

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

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

10 years agoRemove assert added in r201249.
Daniel Jasper [Thu, 13 Feb 2014 14:24:14 +0000 (14:24 +0000)]
Remove assert added in r201249.

This triggers on one of our internal tests.

Dmitri:
I do not understand this part of the codebase well enough to locate the
underlying cause easily. If the correct fix is not obvious, I can try to
debug the problem further or try to come up with reduced test case.

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

10 years agoclang-format: Improve documentation of DerivePointerBinding.
Daniel Jasper [Thu, 13 Feb 2014 12:51:50 +0000 (12:51 +0000)]
clang-format: Improve documentation of DerivePointerBinding.

For reference: llvm.org/PR18690.

Also updated generated help page and page creation script.

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

10 years ago[CMake] add_clang_library(MODULE): Create a phony target when llvm_add_library(MODULE...
NAKAMURA Takumi [Thu, 13 Feb 2014 11:24:45 +0000 (11:24 +0000)]
[CMake] add_clang_library(MODULE): Create a phony target when llvm_add_library(MODULE) gave up.

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

10 years agoARM & AArch64 NEON: share the vabs implementation.
Tim Northover [Thu, 13 Feb 2014 10:44:17 +0000 (10:44 +0000)]
ARM & AArch64 NEON: share the vabs implementation.

This changes ARM to use @llvm.fabs for floating-point vabs. Patterns
already existed in the backend, and it might help mid-end phases since
it's more likely to be understood than @llvm.arm.neon.vabs.

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

10 years agoXCore target pass -v flag to assembler & linker
Robert Lytton [Thu, 13 Feb 2014 10:40:12 +0000 (10:40 +0000)]
XCore target pass -v flag to assembler & linker

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

10 years agoadd comment explaining previous commit
Robert Lytton [Thu, 13 Feb 2014 10:38:56 +0000 (10:38 +0000)]
add comment explaining previous commit

 see 'XCore target -fexceptions flag handling'

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

10 years agoXCore target -fexceptions flag handling
Robert Lytton [Thu, 13 Feb 2014 10:34:44 +0000 (10:34 +0000)]
XCore target -fexceptions flag handling

XCore target has -fno-exception as the default option
Pass on "-fexceptions" flag to xcc (linker)

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

10 years agoRemove spurious default case to silent sanitizer
Renato Golin [Thu, 13 Feb 2014 10:26:33 +0000 (10:26 +0000)]
Remove spurious default case to silent sanitizer

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

10 years agoAdd EXPERIMENTAL --rtlib=compiler-rt to GNU Clang
Renato Golin [Thu, 13 Feb 2014 10:01:16 +0000 (10:01 +0000)]
Add EXPERIMENTAL --rtlib=compiler-rt to GNU Clang

This commit is not strictly correct nor accounts for all uses (shared
objects, for example), but it allows one to test the compiler-rt library
on GNU targets.

Using this patch to run the test-suite has already shown me problems
on ARM. Since this is a Darwin-only flag, nobody is using it, so it
shouldn't be a problem.

I will need extension to deal with the shared cases, but since we're
not compiling libclang_rt.so, that's not yet applicable. Many other
problems will have to be fixed first in compiler-rt (such as removing
the 'arch' name from it and making it trully multi-arch, moving it to
the default lib directory, make both .a and .so variants, etc).

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

10 years ago[OPENMP] 'if' clause support (no CodeGen support)
Alexey Bataev [Thu, 13 Feb 2014 05:29:23 +0000 (05:29 +0000)]
[OPENMP] 'if' clause support (no CodeGen support)

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

10 years agoThere is no std namespace for standards-based attributes. Removing the scope qualifie...
Aaron Ballman [Thu, 13 Feb 2014 04:31:04 +0000 (04:31 +0000)]
There is no std namespace for standards-based attributes. Removing the scope qualifier and updating the only affected test case.

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

10 years agoUse simpler version of fs::create_directory.
Rafael Espindola [Thu, 13 Feb 2014 04:22:54 +0000 (04:22 +0000)]
Use simpler version of fs::create_directory.

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

10 years agoUse simpler version of llvm::sys::fs::create_directories.
Rafael Espindola [Thu, 13 Feb 2014 04:08:44 +0000 (04:08 +0000)]
Use simpler version of llvm::sys::fs::create_directories.

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

10 years agoFixing a compiler assertion with zero-width bit-fields in packed structs.
Yunzhong Gao [Thu, 13 Feb 2014 02:45:10 +0000 (02:45 +0000)]
Fixing a compiler assertion with zero-width bit-fields in packed structs.
According to the GNU docs, zero-sized bitfields should not be affected by the
packed attribute.

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

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

10 years agoReally fix unused variable warnings in CIndex.
Reid Kleckner [Thu, 13 Feb 2014 01:19:59 +0000 (01:19 +0000)]
Really fix unused variable warnings in CIndex.

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

10 years agoms_struct layout replaces platform-specific behavior like
John McCall [Thu, 13 Feb 2014 00:50:08 +0000 (00:50 +0000)]
ms_struct layout replaces platform-specific behavior like
useBitFieldTypeAlignment() and appears to ignore the special
bit-packing semantics of __attribute__((packed)).

Further flesh out an already-extensive comment.

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

10 years agoChange testcase to use FileCheck.
John McCall [Thu, 13 Feb 2014 00:50:02 +0000 (00:50 +0000)]
Change testcase to use FileCheck.

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

10 years agoFix uninitialized read in vtordisp pragma code.
Reid Kleckner [Thu, 13 Feb 2014 00:44:34 +0000 (00:44 +0000)]
Fix uninitialized read in vtordisp pragma code.

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