]> granicus.if.org Git - clang/log
clang
10 years agoUsing an invalid -O falls back on -O3 instead of an error
Sylvestre Ledru [Mon, 18 Nov 2013 13:23:07 +0000 (13:23 +0000)]
Using an invalid -O falls back on -O3 instead of an error

Summary:
Currently with clang:
$ clang -O20 foo.c
error: invalid value '20' in '-O20'

With the patch:
$ clang -O20 foo.c
warning: optimization level '-O20' is unsupported; using '-O3' instead.
1 warning generated.

This matches the gcc behavior (with a warning added)

Pass all tests:
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 94.14s
  Expected Passes    : 6721
  Expected Failures  : 20
  Unsupported Tests  : 17

(which was not the case of http://llvm-reviews.chandlerc.com/D2125)

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

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

10 years agoclang/test/CXX/drs/dr2xx.cpp: Suppress this for targeting LLP64 due to __SIZE_TYPE__.
NAKAMURA Takumi [Mon, 18 Nov 2013 12:58:38 +0000 (12:58 +0000)]
clang/test/CXX/drs/dr2xx.cpp: Suppress this for targeting LLP64 due to __SIZE_TYPE__.

  Line 559: 'long long' is a C++11 extension
  Line 566: 'long long' is a C++11 extension
  Line 674: 'long long' is a C++11 extension

See also PR13819.

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

10 years agoclang/Parse/Parser.h: Fix annotations properly in SkipUntilFlags. [-Wdocumentation]
NAKAMURA Takumi [Mon, 18 Nov 2013 10:38:28 +0000 (10:38 +0000)]
clang/Parse/Parser.h: Fix annotations properly in SkipUntilFlags. [-Wdocumentation]

Use ///< after member.

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

10 years agoReplaced bool parameters in SkipUntil function with single bit-based parameter.
Alexey Bataev [Mon, 18 Nov 2013 08:17:37 +0000 (08:17 +0000)]
Replaced bool parameters in SkipUntil function with single bit-based parameter.

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

10 years agoclang/test/Tooling/multi-jobs.cpp: Mark this as XFAIL:msvc for now. It has been faili...
NAKAMURA Takumi [Mon, 18 Nov 2013 06:57:47 +0000 (06:57 +0000)]
clang/test/Tooling/multi-jobs.cpp: Mark this as XFAIL:msvc for now. It has been failing since r194968.

MSVC targeted drivers (*-win32) are incapable of invoking external assembler.

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

10 years agoImplement the newly added AArch64 ACLE functions for ld1/st1 with 2/3/4 vectors.
Hao Liu [Mon, 18 Nov 2013 06:33:43 +0000 (06:33 +0000)]
Implement the newly added AArch64 ACLE functions for ld1/st1 with 2/3/4 vectors.
The functions are like: vst1_s8_x2 ...

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

10 years agoTests for core issues 251-270.
Richard Smith [Mon, 18 Nov 2013 05:24:03 +0000 (05:24 +0000)]
Tests for core issues 251-270.

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

10 years agoRemove method that always returns true.
Rafael Espindola [Sun, 17 Nov 2013 22:42:24 +0000 (22:42 +0000)]
Remove method that always returns true.

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

10 years agoRemove two unused #ifdefs.
Rafael Espindola [Sun, 17 Nov 2013 22:36:07 +0000 (22:36 +0000)]
Remove two unused #ifdefs.

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

10 years agoRewriteBuffer::write(): Add a doc comment about non-portable use
Alp Toker [Sun, 17 Nov 2013 18:13:43 +0000 (18:13 +0000)]
RewriteBuffer::write(): Add a doc comment about non-portable use

The function isn't strictly at fault but there are callers using it
incorrectly, causing crashes with in-place edits of 64KB or larger files on
Windows.

See PR17960 for details.

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

10 years agoTooling/CompilationDatabase.cpp: Use \return here instead of \param[out]. [-Wdocument...
NAKAMURA Takumi [Sun, 17 Nov 2013 18:05:49 +0000 (18:05 +0000)]
Tooling/CompilationDatabase.cpp: Use \return here instead of \param[out]. [-Wdocumentation]

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

10 years agoRemove a bad string compare from r194968
Alp Toker [Sun, 17 Nov 2013 16:49:24 +0000 (16:49 +0000)]
Remove a bad string compare from r194968

  lib/Tooling/CompilationDatabase.cpp:275:34: warning: result of comparison against a string literal is unspecified (use strncmp instead) [-Wstring-compare]

This assert() should probably be fixed and added back at some point.

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

10 years agoRelax some preconditions for using FixedCompilationDatabase.
Edwin Vane [Sun, 17 Nov 2013 16:08:04 +0000 (16:08 +0000)]
Relax some preconditions for using FixedCompilationDatabase.

FixedCompilationDatabase (FCD) requires that the arguments it consumes after
'--' must not include positional parameters or the argv[0] of the tool. This
patch relaxes those restrictions.

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

10 years agoAdd -freroll-loops to enable loop rerolling
Hal Finkel [Sun, 17 Nov 2013 16:03:29 +0000 (16:03 +0000)]
Add -freroll-loops to enable loop rerolling

This adds -freroll-loops (and -fno-reroll-loops in the usual way) to enable
loop rerolling as part of the optimization pass manager. This transformation
can enable vectorization, reduce code size (or both).

Briefly, loop rerolling can transform a loop like this:

for (int i = 0; i < 3200; i += 5) {
  a[i]     += alpha * b[i];
  a[i + 1] += alpha * b[i + 1];
  a[i + 2] += alpha * b[i + 2];
  a[i + 3] += alpha * b[i + 3];
  a[i + 4] += alpha * b[i + 4];
}

into this:

for (int i = 0; i < 3200; ++i) {
  a[i] += alpha * b[i];
}

Loop rerolling is currently disabled by default at all optimization levels.

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

10 years agoFixes a typo and changes references to the function clang_displayDiagnostic (which...
Sylvestre Ledru [Sun, 17 Nov 2013 09:46:45 +0000 (09:46 +0000)]
Fixes a typo and changes references to the function clang_displayDiagnostic (which was removed in r96823) to clang_formatDiagnostics.

Patch by David Wiberg

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

10 years agoImplement vreinterpret ACLE functions in Clang.
Hao Liu [Sun, 17 Nov 2013 09:32:59 +0000 (09:32 +0000)]
Implement vreinterpret ACLE functions in Clang.

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

10 years ago[analyzer] Better modeling of memcpy by the CStringChecker (PR16731).
Anton Yartsev [Sun, 17 Nov 2013 09:18:48 +0000 (09:18 +0000)]
[analyzer] Better modeling of memcpy by the CStringChecker (PR16731).

New rules of invalidation/escape of the source buffer of memcpy: the source buffer contents is invalidated and escape while the source buffer region itself is neither invalidated, nor escape.
In the current modeling of memcpy the information about allocation state of regions, accessible through the source buffer, is not copied to the destination buffer and we can not track the allocation state of those regions anymore. So we invalidate/escape the source buffer indirect regions in anticipation of their being invalidated for real later. This eliminates false-positive leaks reported by the unix.Malloc and alpha.cplusplus.NewDeleteLeaks checkers for the cases like

char *f() {
  void *x = malloc(47);
  char *a;
  memcpy(&a, &x, sizeof a);
  return a;
}

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

10 years agoFix the problem that the arm_neon.h can't be used in a cpp file. Also fix a minor...
Hao Liu [Sun, 17 Nov 2013 09:14:46 +0000 (09:14 +0000)]
Fix the problem that the arm_neon.h can't be used in a cpp file. Also fix a minor bug with poly64 name mangling.

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

10 years agoTests for core issue 241-250.
Richard Smith [Sun, 17 Nov 2013 06:39:43 +0000 (06:39 +0000)]
Tests for core issue 241-250.

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

10 years agoTests for core issues 224-240.
Richard Smith [Sun, 17 Nov 2013 02:50:30 +0000 (02:50 +0000)]
Tests for core issues 224-240.

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

10 years agoObjectiveC ARC. More validation of toll-free bridging of
Fariborz Jahanian [Sat, 16 Nov 2013 23:22:37 +0000 (23:22 +0000)]
ObjectiveC ARC. More validation of toll-free bridging of
CF objects with objc_bridge'ing annotaiton.
// rdar://15454846

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

10 years agoObjectiveC ARC. Validate toll free bridge casting
Fariborz Jahanian [Sat, 16 Nov 2013 19:16:32 +0000 (19:16 +0000)]
ObjectiveC ARC. Validate toll free bridge casting
of ObjectiveC objects to CF types when CF type
has the objc_bridge attribute.

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

10 years agoRemove unused but set variable.
Benjamin Kramer [Sat, 16 Nov 2013 11:47:52 +0000 (11:47 +0000)]
Remove unused but set variable.

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

10 years agoMove remaining %clang_cc1 tests out of test/Driver
Alp Toker [Sat, 16 Nov 2013 06:20:17 +0000 (06:20 +0000)]
Move remaining %clang_cc1 tests out of test/Driver

clang -cc1 skips the driver so it never made sense to include these with the
Driver tests.

Basic type tests and flag tests generally both go in Frontend.

Now that the final -cc1 tests have been moved out of test/Driver, add a
local substitution to enforce and detect future mistakes.

These miscategorized tests were probably the source of confusion in r194817.

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

10 years agoIf a replaceable global operator new/delete is marked inline, don't warn if
Richard Smith [Sat, 16 Nov 2013 01:57:09 +0000 (01:57 +0000)]
If a replaceable global operator new/delete is marked inline, don't warn if
it's also __attribute__((used)), since that undoes the problematic part of
'inline'.

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

10 years agoObjetiveC ARC. Start diagnosing invalid toll free bridging.
Fariborz Jahanian [Sat, 16 Nov 2013 01:45:25 +0000 (01:45 +0000)]
ObjetiveC ARC. Start diagnosing invalid toll free bridging.
// rdar://15454846.

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

10 years agoX86: Make specifying avx2 simpler on Darwin with '-arch'
Jim Grosbach [Sat, 16 Nov 2013 00:53:35 +0000 (00:53 +0000)]
X86: Make specifying avx2 simpler on Darwin with '-arch'

Teach the '-arch' command line option to enable the compiler-friendly
features of core-avx2 CPUs on Darwin. Pass the information along in the
target triple like Darwin+ARM does.

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

10 years agoDowngrade the Error on an 'inline' operator new or delete to an ExtWarn. Some
Richard Smith [Sat, 16 Nov 2013 00:47:38 +0000 (00:47 +0000)]
Downgrade the Error on an 'inline' operator new or delete to an ExtWarn. Some
projects are relying on such (questionable) practices, so we should give them
a way to opt out of this diagnostic.

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

10 years agoConsumed analysis: track state of temporary objects.
DeLesley Hutchins [Sat, 16 Nov 2013 00:22:43 +0000 (00:22 +0000)]
Consumed analysis: track state of temporary objects.
Earlier versions discarded the state too soon, and did not track state changes,
e.g. when passing a temporary to a move constructor.  Patch by
chris.wailes@gmail.com; review and minor fixes by delesley.

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

10 years agoCorrected comment about MS prgama warning.
John Thompson [Sat, 16 Nov 2013 00:16:03 +0000 (00:16 +0000)]
Corrected comment about MS prgama warning.

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

10 years agoImplemented aarch64 Neon scalar vmulx_lane intrinsics
Ana Pazos [Fri, 15 Nov 2013 23:33:31 +0000 (23:33 +0000)]
Implemented aarch64 Neon scalar vmulx_lane intrinsics
Implemented aarch64 Neon scalar vfma_lane intrinsics
Implemented aarch64 Neon scalar vfms_lane intrinsics

Implemented legacy vmul_n_f64, vmul_lane_f64, vmul_laneq_f64
intrinsics (v1f64 parameter type) using Neon scalar instructions.

Implemented legacy vfma_lane_f64, vfms_lane_f64,
vfma_laneq_f64, vfms_laneq_f64 intrinsics (v1f64 parameter type)
using Neon scalar instructions.

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

10 years agoUpdated comment - testing commit rights
Ana Pazos [Fri, 15 Nov 2013 23:25:10 +0000 (23:25 +0000)]
Updated comment - testing commit rights

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

10 years agoObjectiveC ARC. Only briding of pointer to struct CF object is allowed.
Fariborz Jahanian [Fri, 15 Nov 2013 23:14:45 +0000 (23:14 +0000)]
ObjectiveC ARC. Only briding of pointer to struct CF object is allowed.
Improve on wording on illegal objc_bridge argumment.
// rdar://15454846

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

10 years agoDarwin(ish): enable embedded compiler-rt builds on Darwin.
Tim Northover [Fri, 15 Nov 2013 23:12:44 +0000 (23:12 +0000)]
Darwin(ish): enable embedded compiler-rt builds on Darwin.

This builds extra versions of compiler-rt targeting various unhosted targets.
Only built on Darwin since even though they're not iOS or OSX, they share some
quirks.

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

10 years agoPR17949: Fix crash if someone puts a namespace inside a class template.
Richard Smith [Fri, 15 Nov 2013 23:00:02 +0000 (23:00 +0000)]
PR17949: Fix crash if someone puts a namespace inside a class template.

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

10 years agoPR8455: Handle an attribute between a goto label and a variable declaration per
Richard Smith [Fri, 15 Nov 2013 22:45:29 +0000 (22:45 +0000)]
PR8455: Handle an attribute between a goto label and a variable declaration per
the GNU documentation: the attribute only appertains to the label if it is
followed by a semicolon. Based on a patch by Aaron Ballman!

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

10 years agoObjectiveC ARG. A positive test of my previous patch.
Fariborz Jahanian [Fri, 15 Nov 2013 22:33:12 +0000 (22:33 +0000)]
ObjectiveC ARG. A positive test of my previous patch.
// rdar://15454846

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

10 years agoFix typo in CGRecordLayoutBuilder.cpp: s/Field/Fields/ in comment
Hans Wennborg [Fri, 15 Nov 2013 22:31:11 +0000 (22:31 +0000)]
Fix typo in CGRecordLayoutBuilder.cpp: s/Field/Fields/ in comment

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

10 years agoObjectiveC ARC. Lookup type associated with objc_bridage at
Fariborz Jahanian [Fri, 15 Nov 2013 22:18:17 +0000 (22:18 +0000)]
ObjectiveC ARC. Lookup type associated with objc_bridage at
the point of CF object type-cast and issue diagnostic
if it is not a valid ObjectiveC class. // rdar//15454846.
This is wip.

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

10 years agoThese ACLE tests no longer need to cast the return value.
Chad Rosier [Fri, 15 Nov 2013 21:28:24 +0000 (21:28 +0000)]
These ACLE tests no longer need to cast the return value.

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

10 years agoDiagnose C++11 attributes before fp_contract pragmas.
Richard Smith [Fri, 15 Nov 2013 21:10:54 +0000 (21:10 +0000)]
Diagnose C++11 attributes before fp_contract pragmas.

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

10 years agoFix bogus diagnostic wording. There's no such thing as a compound expression.
Richard Smith [Fri, 15 Nov 2013 21:08:45 +0000 (21:08 +0000)]
Fix bogus diagnostic wording. There's no such thing as a compound expression.

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

10 years agoRevert "Using an invalid -O falls back on -O3 instead of an error"
Alp Toker [Fri, 15 Nov 2013 20:40:58 +0000 (20:40 +0000)]
Revert "Using an invalid -O falls back on -O3 instead of an error"

Trying to fix test failures since earlier today.

One of the tests added in this commit is outputting test/Driver/clang_f_opts.s
which the builders that build in-tree (eg. clang-native-arm-cortex-a9) are
trying to run as a test case, causing failures.

clang_f_opts.c:
  If -### doesn't emit the warning then this test probably shouldn't be in
  here in the first place. Frontend maybe?

invalid-o-level.c:
  Running %clang_cc1 in the Driver tests doesn't make sense because -cc1
  bypasses the driver. (I'm not reverting the commit that introduced this but
  please fix instead of keeping it this way.)

Reverting to fix the build failures and also so that the tests can be thought
out more thoroughly.

This reverts commit r194817.

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

10 years agoclang-cl: Make the driver parse all(?) msvc flags
Hans Wennborg [Fri, 15 Nov 2013 18:29:58 +0000 (18:29 +0000)]
clang-cl: Make the driver parse all(?) msvc flags

Even if we don't support a flag, we should be able to parse it
to provide a better error message than the current default
"error: no such file or directory: '/foo'" (which we should probably
also tweak, btw).

This also tries to clean up the test file a bit.

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

10 years agoRemove an unused local from r194827
Alp Toker [Fri, 15 Nov 2013 18:09:28 +0000 (18:09 +0000)]
Remove an unused local from r194827

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

10 years agoDarwin: Look for libc++ headers in include/, rather than lib/
Justin Bogner [Fri, 15 Nov 2013 18:07:59 +0000 (18:07 +0000)]
Darwin: Look for libc++ headers in include/, rather than lib/

Up until now we were expecting that when libc++ is installed alongside
clang the headers would be in lib/, which was true if the configure
build was used and false if the cmake build was.

We've now corrected the configure build to install in include/, and
with this change we'll be able to find the correct headers with both
build systems.

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

10 years agolibc++: Install headers in include/, rather than lib/
Justin Bogner [Fri, 15 Nov 2013 18:07:57 +0000 (18:07 +0000)]
libc++: Install headers in include/, rather than lib/

When using the configure build system, the libc++ headers were being
installed in lib/, whereas cmake installs them in include/. Since
include/ makes more sense for headers, we'll make both systems install
headers there.

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

10 years agoObjectiveC. Fixes a bogus warning of unused backing
Fariborz Jahanian [Fri, 15 Nov 2013 17:48:00 +0000 (17:48 +0000)]
ObjectiveC. Fixes a bogus warning of unused backing
ivar when property belongs to a super class and
currnt class happens to have a method with same name as
property. // rdar//15473432

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

10 years agoUpdate contact information.
Chad Rosier [Fri, 15 Nov 2013 17:35:53 +0000 (17:35 +0000)]
Update contact information.

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

10 years ago[-cxx-abi microsoft] Emit thunks for pointers to virtual member functions
Hans Wennborg [Fri, 15 Nov 2013 17:24:45 +0000 (17:24 +0000)]
[-cxx-abi microsoft] Emit thunks for pointers to virtual member functions

Instead of storing the vtable offset directly in the function pointer and
doing a branch to check for virtualness at each call site, the MS ABI
generates a thunk for calling the function at a specific vtable offset,
and puts that in the function pointer.

This patch adds support for emitting such thunks. However, it doesn't support
pointers to virtual member functions that are variadic, have an incomplete
aggregate return type or parameter, or are overriding a function in a virtual
base class.

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

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

10 years ago[ASan] Fix darwin-sanitizer-ld.c for iossim, which seems to use -lc++ instead of...
Alexander Potapenko [Fri, 15 Nov 2013 16:57:57 +0000 (16:57 +0000)]
[ASan] Fix darwin-sanitizer-ld.c for iossim, which seems to use -lc++ instead of -lstdc++.

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

10 years ago[ASan] Link with libclang_rt.asan_iossim_dynamic.dylib when targeting the iOS simulator.
Alexander Potapenko [Fri, 15 Nov 2013 16:07:44 +0000 (16:07 +0000)]
[ASan] Link with libclang_rt.asan_iossim_dynamic.dylib when targeting the iOS simulator.
Add a test.

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

10 years agoUsing an invalid -O falls back on -O3 instead of an error
Sylvestre Ledru [Fri, 15 Nov 2013 15:39:14 +0000 (15:39 +0000)]
Using an invalid -O falls back on -O3 instead of an error

Summary:
Currently with clang:
$ clang -O20 foo.c
error: invalid value '20' in '-O20'

With the patch:
$ clang -O20 foo.c
warning: optimization level '-O20' is unsupported; using '-O3' instead.
1 warning generated.

This matches the gcc behavior (with a warning added)

Pass all tests:
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 94.14s
  Expected Passes    : 6721
  Expected Failures  : 20
  Unsupported Tests  : 17

(which was not the case of http://llvm-reviews.chandlerc.com/D2125)

Reviewers: chandlerc, rafael, rengolin, hfinkel

Reviewed By: rengolin

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

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

10 years ago[ASan] If the iOS Simulator SDK is available, build the ASan iossim runtime using...
Alexander Potapenko [Fri, 15 Nov 2013 14:56:31 +0000 (14:56 +0000)]
[ASan] If the iOS Simulator SDK is available, build the ASan iossim runtime using configure+make.

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

10 years agoIgnore test Inputs globally and remove redundant lit.local.cfg files
Alp Toker [Fri, 15 Nov 2013 13:37:49 +0000 (13:37 +0000)]
Ignore test Inputs globally and remove redundant lit.local.cfg files

By adding a default config.excludes pattern we can avoid individual
suppressions in subdirectories.

This matches LLVM's lit.cfg which also excludes a few other common non-test
filenames for consistency.

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

10 years agoTests for core issue 216-223.
Richard Smith [Fri, 15 Nov 2013 08:55:01 +0000 (08:55 +0000)]
Tests for core issue 216-223.

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

10 years agoWhen we hit a #include directive that maps to a module import, emit a token
Richard Smith [Fri, 15 Nov 2013 04:24:58 +0000 (04:24 +0000)]
When we hit a #include directive that maps to a module import, emit a token
representing the module import rather than making the module immediately
visible. This serves two goals:
 * It avoids making declarations in the module visible prematurely, if we
   walk past the #include during a tentative parse, for instance, and
 * It gives a diagnostic (although, admittedly, not a very nice one) if
   a header with a corresponding module is included anywhere other than
   at the top level.

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

10 years agoPR17533 and duplicates: don't compute the return type of an overloaded operator
Richard Smith [Fri, 15 Nov 2013 02:58:23 +0000 (02:58 +0000)]
PR17533 and duplicates: don't compute the return type of an overloaded operator
until after we've referenced the operator; otherwise, we might pick up a
not-yet-deduced type.

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

10 years agoDon't reject dependent range-based for loops in constexpr functions. The loop
Richard Smith [Fri, 15 Nov 2013 02:29:26 +0000 (02:29 +0000)]
Don't reject dependent range-based for loops in constexpr functions. The loop
variable isn't really uninitialized, it's just not initialized yet.

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

10 years agoFix test failures after addrspacecast added.
Matt Arsenault [Fri, 15 Nov 2013 02:19:52 +0000 (02:19 +0000)]
Fix test failures after addrspacecast added.

Bitcasts between address spaces are no longer allowed.

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

10 years ago[analyzer] Silence warnings coming from allocators used by std::basic_string.
Jordan Rose [Fri, 15 Nov 2013 02:11:19 +0000 (02:11 +0000)]
[analyzer] Silence warnings coming from allocators used by std::basic_string.

This is similar to r194004: because we can't reason about the data structure
invariants of std::basic_string, the analyzer decides it's possible for an
allocator to be used to deallocate the string's inline storage. Just ignore
this by walking up the stack, skipping past methods in classes with
"allocator" in the name, and seeing if we reach std::basic_string that way.

PR17866

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

10 years ago[analyzer] Include bug column numbers in HTML output (in a comment).
Jordan Rose [Fri, 15 Nov 2013 02:11:11 +0000 (02:11 +0000)]
[analyzer] Include bug column numbers in HTML output (in a comment).

This has no effect on user-visible output, but can be used by post-processing
tools that work with the generated HTML, rather than using CmpRuns.py's
interface to work with plists.

Patch by György Orbán!

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

10 years agoModern gcc is happy to constant evaluate __builtin_strlen in various cases
Richard Smith [Fri, 15 Nov 2013 02:10:04 +0000 (02:10 +0000)]
Modern gcc is happy to constant evaluate __builtin_strlen in various cases
where we didn't. Extend our constant evaluation for __builtin_strlen to handle
any constant array of chars, not just string literals, to match.

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

10 years agoR600: Add processor type for Hawaii
Tom Stellard [Thu, 14 Nov 2013 23:45:53 +0000 (23:45 +0000)]
R600: Add processor type for Hawaii

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

10 years agoPR 17916: Don't fail if xcrun is not present.
Joerg Sonnenberger [Thu, 14 Nov 2013 23:18:08 +0000 (23:18 +0000)]
PR 17916: Don't fail if xcrun is not present.

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

10 years agoFix typo
David Peixotto [Thu, 14 Nov 2013 22:58:17 +0000 (22:58 +0000)]
Fix typo

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

10 years agoPass -Wa,-I and -Xassembler -I args to integrated assembler
David Peixotto [Thu, 14 Nov 2013 22:52:58 +0000 (22:52 +0000)]
Pass -Wa,-I and -Xassembler -I args to integrated assembler

This patch adds -I to the arguments that are passed to the
integrated assembler from -Wa, and -Xassembler args.

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

10 years agoInstall clang-format's editor integrations in $PREFIX/share/clang/
Hans Wennborg [Thu, 14 Nov 2013 22:48:06 +0000 (22:48 +0000)]
Install clang-format's editor integrations in $PREFIX/share/clang/

They were previously not part of the install target.

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

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

10 years agoDR408: If a static data member of incomplete array type is declared in a class
Richard Smith [Thu, 14 Nov 2013 22:40:45 +0000 (22:40 +0000)]
DR408: If a static data member of incomplete array type is declared in a class
template, that member has a dependent type (even if we can see the definition
of the member of the primary template), because the array size could change in
a member specialization.

Patch by Karthik Bhat!

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

10 years agoMakes A Microsoft Layout CodeGen Test Explicit
Warren Hunt [Thu, 14 Nov 2013 22:34:59 +0000 (22:34 +0000)]
Makes A Microsoft Layout CodeGen Test Explicit

This patch tests introduces a proper codegen test in place of the
"codegen no longer crashes" test introduced in r193664. The test is also
moved from layout to CodeGenCXX.

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

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

10 years agoAdd -Wdeprecated-writable-string in C++ to -Wc++11-compat, since it's ill-formed...
Richard Smith [Thu, 14 Nov 2013 22:22:31 +0000 (22:22 +0000)]
Add -Wdeprecated-writable-string in C++ to -Wc++11-compat, since it's ill-formed in C++11.

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

10 years ago[AArch64] Add support for legacy AArch32 NEON scalar shift right by immediate
Chad Rosier [Thu, 14 Nov 2013 22:02:24 +0000 (22:02 +0000)]
[AArch64] Add support for legacy AArch32 NEON scalar shift right by immediate
and accumulate instructions.

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

10 years agoObjectiveC migrator: This patch sets access property
Fariborz Jahanian [Thu, 14 Nov 2013 18:28:58 +0000 (18:28 +0000)]
ObjectiveC migrator: This patch sets access property
attributes on 'readonly' properties. // rdar://15460787

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

10 years ago[OpenCL] Make sure we put string literals in the constant address space.
Joey Gouly [Thu, 14 Nov 2013 18:26:10 +0000 (18:26 +0000)]
[OpenCL] Make sure we put string literals in the constant address space.

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

10 years ago[analyzer] Treat MSVC's _wassert as noreturn.
Jordan Rose [Thu, 14 Nov 2013 17:55:00 +0000 (17:55 +0000)]
[analyzer] Treat MSVC's _wassert as noreturn.

This makes sure the analyzer actually honors assert() in an MSVC project.

Patch by Anders Montonen!

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

10 years ago[objcmt] Introduce "objcmt-white-list-dir-path=" option.
Argyrios Kyrtzidis [Thu, 14 Nov 2013 16:33:29 +0000 (16:33 +0000)]
[objcmt] Introduce "objcmt-white-list-dir-path=" option.

This options accepts a path to a directory, collects the filenames of the files
it contains, and the migrator will only modify files with the same filename.

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

10 years ago[objcmt] -objcmt-atomic-property & -objcmt-ns-nonatomic-iosonly are companion flags.
Argyrios Kyrtzidis [Thu, 14 Nov 2013 16:33:20 +0000 (16:33 +0000)]
[objcmt] -objcmt-atomic-property & -objcmt-ns-nonatomic-iosonly are companion flags.
Ignore them when determining if some transformation was enabled.

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

10 years agoMove classes into anonymous namespaces.
Benjamin Kramer [Thu, 14 Nov 2013 15:46:10 +0000 (15:46 +0000)]
Move classes into anonymous namespaces.

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

10 years ago[Mips] Add tests for MIPS/MIPS64 type defines and type limits macros. No
Simon Atanasyan [Thu, 14 Nov 2013 11:15:10 +0000 (11:15 +0000)]
[Mips] Add tests for MIPS/MIPS64 type defines and type limits macros. No
functional changes - just reflection of the current state.

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

10 years agoRemove a test failure.
Kevin Qin [Thu, 14 Nov 2013 07:00:00 +0000 (07:00 +0000)]
Remove a test failure.

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

10 years agoAdd test case for AArch64 NEON poly64 intrinsic.
Kevin Qin [Thu, 14 Nov 2013 06:49:00 +0000 (06:49 +0000)]
Add test case for AArch64 NEON poly64 intrinsic.

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

10 years agoAdd test cases for AArch64 NEON instruction set misc.
Kevin Qin [Thu, 14 Nov 2013 06:44:42 +0000 (06:44 +0000)]
Add test cases for AArch64 NEON instruction set misc.

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

10 years agoRevert r194663 and r194647.
Ted Kremenek [Thu, 14 Nov 2013 04:44:56 +0000 (04:44 +0000)]
Revert r194663 and r194647.

Per feedback from Jordan Rose I realized this wasn't the right way to go.

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

10 years agoRefine -Wunused-variable to only suppress warning for __bridge_transfer, not all...
Ted Kremenek [Thu, 14 Nov 2013 04:27:00 +0000 (04:27 +0000)]
Refine -Wunused-variable to only suppress warning for __bridge_transfer, not all bridge casts.

Also refine test case to capture the intention of this suppression.  Essentially
some developers use __bridge_transfer as if it were a safe CFRelease.

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

10 years ago[AArch64 neon] support poly64 and relevant intrinsic functions.
Kevin Qin [Thu, 14 Nov 2013 03:29:16 +0000 (03:29 +0000)]
[AArch64 neon] support poly64 and relevant intrinsic functions.

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

10 years agoImplement aarch64 neon instruction class misc.
Kevin Qin [Thu, 14 Nov 2013 02:45:18 +0000 (02:45 +0000)]
Implement aarch64 neon instruction class misc.

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

10 years agoAdded warning on structures/unions that are empty or contain only
Serge Pavlov [Thu, 14 Nov 2013 02:13:03 +0000 (02:13 +0000)]
Added warning on structures/unions that are empty or contain only
bit fields of zero size. Warnings are generated in C++ mode and if
only such type is defined inside extern "C" block.
The patch fixed PR5065.

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

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

10 years agoImplement AArch64 NEON instruction set AdvSIMD (table).
Jiangning Liu [Thu, 14 Nov 2013 01:57:55 +0000 (01:57 +0000)]
Implement AArch64 NEON instruction set AdvSIMD (table).

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

10 years agoSuppress -Wunused-variable when initializer uses bridge casts for memory management.
Ted Kremenek [Thu, 14 Nov 2013 01:42:17 +0000 (01:42 +0000)]
Suppress -Wunused-variable when initializer uses bridge casts for memory management.

Fixes <rdar://problem/15432770>.

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

10 years agoUse a more realistic NS class names in
Fariborz Jahanian [Thu, 14 Nov 2013 01:00:26 +0000 (01:00 +0000)]
Use a more realistic NS class names in
objc_bridge attributes in my previous test.
Per Jordan's comment.

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

10 years agoObjectiveC ARC. objc_bridge attribute should be applied to
Fariborz Jahanian [Thu, 14 Nov 2013 00:43:05 +0000 (00:43 +0000)]
ObjectiveC ARC. objc_bridge attribute should be applied to
toll-free bridging cf types only. // rdar//15454846 wip.

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

10 years agoWork around a bug in old gcc on the FreeBSD bot, which complains about
Dmitri Gribenko [Thu, 14 Nov 2013 00:36:24 +0000 (00:36 +0000)]
Work around a bug in old gcc on the FreeBSD bot, which complains about
ambiguity between index() function and clang::index namespace.

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

10 years agoObjectiveC ARC. Introduce a new attribute, 'objc_bridge'
Fariborz Jahanian [Wed, 13 Nov 2013 23:59:17 +0000 (23:59 +0000)]
ObjectiveC ARC. Introduce a new attribute, 'objc_bridge'
that teaches the compiler about a subset of toll-free
bridging semantics. This is wip. // rdar://15454846

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

10 years ago[objcmt] If no objcmt options were specified, default to enable literals+subscripting.
Argyrios Kyrtzidis [Wed, 13 Nov 2013 23:38:22 +0000 (23:38 +0000)]
[objcmt] If no objcmt options were specified, default to enable literals+subscripting.

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

10 years ago[objcmt] Transfer the objcmt flags from the driver to cc1 invocation and
Argyrios Kyrtzidis [Wed, 13 Nov 2013 23:38:20 +0000 (23:38 +0000)]
[objcmt] Transfer the objcmt flags from the driver to cc1 invocation and
instantiate ObjCMigrateASTConsumer with the specific options that were enabled.

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

10 years ago[objcmt] If the frontend option is frontend::MigrateSource then we don't need to...
Argyrios Kyrtzidis [Wed, 13 Nov 2013 23:38:17 +0000 (23:38 +0000)]
[objcmt] If the frontend option is frontend::MigrateSource then we don't need to create
the arcmt wrappers.

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

10 years agoDon't use alias from derived dtor to base dtor at -O0.
Rafael Espindola [Wed, 13 Nov 2013 23:20:45 +0000 (23:20 +0000)]
Don't use alias from derived dtor to base dtor at -O0.

This patch disables aliasing (and rauw) of derived dtors to base dtors at -O0.
This optimization can have a negative impact on the debug quality.

This was a latent bug for some time with local classes, but got noticed when it
was generalized and broke gdb's destrprint.exp.

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

10 years ago-fms-extensions: Recognize _alloca as an alias for the alloca builtin
Reid Kleckner [Wed, 13 Nov 2013 22:58:53 +0000 (22:58 +0000)]
-fms-extensions: Recognize _alloca as an alias for the alloca builtin

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

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

10 years agoOnly provide MS builtins when -fms-extensions is on
Reid Kleckner [Wed, 13 Nov 2013 22:47:22 +0000 (22:47 +0000)]
Only provide MS builtins when -fms-extensions is on

We already have builtins that are only available in GNU mode, so this
mirrors that.

Reviewers: rsmith

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

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

10 years agolibclang does not depend directly on clangFormat; but clangIndex does
Dmitri Gribenko [Wed, 13 Nov 2013 22:26:04 +0000 (22:26 +0000)]
libclang does not depend directly on clangFormat; but clangIndex does

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