Commit Graph

60000 Commits

Author SHA1 Message Date
Chris Bieneman f57d2f430d Honor system specific paths of MAN pages
Summary: Caught on NetBSD.

Patch by: Kamil Rytarowski (krytarowski)

Reviewers: beanz, jroelofs

Subscribers: cfe-commits, joerg

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253693 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 18:49:02 +00:00
Dehao Chen cdf86baa9b Add -disable-llvm-passes for frontend debug info tests.
Summary: The frontend debuginfo tests should not invoke llvm passes which includes add-discriminators that will change the debug info generated by FE.

Reviewers: dblaikie

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253686 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 18:29:01 +00:00
Reid Kleckner da953be488 [DebugInfo] Look through type sugar on union types when casting
Fixes PR25584.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253680 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 17:41:12 +00:00
Hans Wennborg 24d8ca594e Revert r253582: "clang-cl: Make /W4 imply -Wall -Wextra (PR25563)"
The patch expanded the flag *at the end*, breaking invocations like:

  clang-cl /W4 -Wno-unused-parameter

Reverting for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253678 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 16:51:56 +00:00
Artyom Skrobov 798ee0c817 Handle ARMv6-J as an alias, instead of fake architecture
Summary: Clang-side update, corresponding to D14755

Reviewers: rengolin, bogden, compnerd

Subscribers: aemerson, rengolin, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253677 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 16:47:05 +00:00
Daniel Jasper 92bd16fea4 clang-format: [JS] Make AllowShortFunctionsOnASingle line value "Empty"
work properly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253674 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 16:44:28 +00:00
Daniel Jasper 53b1a37ee0 clang-format: [JS] Properly add a space after "in" in for loops.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253672 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 16:18:42 +00:00
Daniel Jasper 36d78064b0 clang-format: [JS] struct and union aren't keywords / reserved words.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253671 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 15:58:50 +00:00
Daniel Jasper aaf49845dc clang-format: Don't use incorrect space in macro calls with operators.
Before:
  MACRO(> );

After:
  MACRO(>);

Not overly important, but easy and good for symmetry reasons :-).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253669 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 15:26:50 +00:00
Daniel Jasper c48bd86a18 clang-format: [Proto] Support extending message.
Before:
  extend.foo.Bar {
  }

After:
  extend .foo.Bar {
  }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253667 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 14:32:54 +00:00
Benjamin Kramer 1a52114f4d Regenerate ASTMatchersReference without CRLF.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253654 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 07:57:46 +00:00
Benjamin Kramer 8180a1c712 Fix ASTMatcher reference newlines and make the generator script windows-proof.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253653 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 07:46:19 +00:00
Alexey Bataev afdb643df2 [MS] Fix for bug 25013 - #pragma vtordisp is unknown inside functions, by Denis Zobnin.
This patch adds support of #pragma vtordisp inside functions in attempt to improve compatibility. Microsoft compiler appears to save the stack of vtordisp modes on entry of struct methods' bodies and restore it on exit (method-local vtordisp).
Differential Revision: http://reviews.llvm.org/D14467



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253650 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 07:02:57 +00:00
Douglas Katzman 5885136736 [Myriad]: handle Preprocess job action (-E)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253647 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 04:58:12 +00:00
Argyrios Kyrtzidis 96d406d68d [libclang] Make sure to use the raw module format for libclang parsing.
Fixes crash when passing '-gmodules' in the compiler options.
rdar://23588717

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253645 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 03:36:21 +00:00
Richard Smith f61c3b3e93 [coroutines] Per latest wording paper, co_* are no longer permitted in any
unevaluated operands.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253641 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 02:54:01 +00:00
Argyrios Kyrtzidis 16982b6f64 [CMake] Add a specific 'install-clang-headers' target.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253636 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 02:24:03 +00:00
Devin Coughlin 4df7572a49 [analyzer] DeadStoresChecker: Treat locals captured by reference in C++ lambdas as escaped.
The analyzer currently reports dead store false positives when a local variable
is captured by reference in a C++ lambda.

For example:

  int local = 0; auto lambda = [&local]() {
    local++;
  };
  local = 7; // False Positive: Value stored to 'local' is never read
  lambda();

In this case, the assignment setting `local` to 7 is not a dead store because
the called lambda will later read that assigned value.

This commit silences this source of false positives by treating locals captured
by reference in C++ lambdas as escaped, similarly to how the DeadStoresChecker
deals with locals whose address is taken.

rdar://problem/22165179

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253630 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 01:53:44 +00:00
Chris Bieneman 8c275d55c7 Support CMake's clang_rt.profile library naming scheme
Summary: This code is a bit undesirable, but it gets clang to work with the autoconf and cmake-built libclang_rt.profile libraries.

Reviewers: bogner

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253625 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 00:19:21 +00:00
Tom Stellard 6306f491e5 AMDGPU: Add support for 's' and 'v' asm constraints
Summary: 's' is used to specify sgprs and 'v' is used to specify vgprs.

Reviewers: arsenm, echristo

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253610 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19 22:11:58 +00:00
Dehao Chen 2b42c5bb60 Update clang tests to accomendate discriminator changes.
Summary: The discriminator change in http://reviews.llvm.org/D14738 will fail these clang tests. Update the test to accomendate the discriminator change.

Reviewers: dblaikie, davidxl, dnovillo

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253595 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19 19:53:16 +00:00
Faisal Vali 58e21c2b66 Change the expression evaluation context from Unevaluated to ConstantEvaluated while substituting into non-type template argument defaults.
Also address a typo from a prior patch that performed a similar fix during Parsing of default non-type template arguments.  I left the RAII ExpressionEvaluationContext variable Name as Unevaluated though we had switched the context to ConstantEvaluated.

There should be no functionality change here - since when expression evaluation context is popped off, for the most part these two contexts currently behave similarly in regards to lambda diagnostics and odr-use tracking.

Like its parsing counterpart, this patch presages the advent of constexpr lambda patches...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253590 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19 19:20:17 +00:00
Hans Wennborg d6fdc583ab clang-cl: Make /W4 imply -Wall -Wextra (PR25563)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253582 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19 17:49:59 +00:00
NAKAMURA Takumi beb8fbb809 clangFrontend: [PR25565] Quick fix for dependencies on Attributes.inc.
FIXME: Attributes.inc may be an independent target.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253554 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19 10:59:48 +00:00
Alexey Bataev ad01cf79a7 PR10235: support for vector mode attributes + warning, by Dmitry Polukhin.
Add support for vector mode attributes like "attribute((mode(V4SF)))". Also add warning about deprecated vector modes like GCC does.
Differential Revision: http://reviews.llvm.org/D14744


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253551 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19 10:13:11 +00:00
Pete Cooper 9afee2105b Revert "Change memcpy/memset/memmove to have dest and source alignments."
This reverts commit r253512.

This likely broke the bots in:
http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/20202
http://bb.pgr.jp/builders/clang-3stage-i686-linux/builds/3787

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253542 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19 05:55:59 +00:00
Pete Cooper d521ec8aa6 Revert "Fix debian build after r253512."
This reverts commit r253519.

This likely broke the bots in
http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/20202
http://bb.pgr.jp/builders/clang-3stage-i686-linux/builds/3787

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253541 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19 05:55:44 +00:00
Richard Smith 569d398385 [coroutines] Tweak diagnostics to always use fully-qualified name for std::coroutine_traits.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253535 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19 02:36:35 +00:00
John McCall 2419506e4a Don't actually add the __unsafe_unretained qualifier in MRC;
driving a canonical difference between that and an unqualified
type is a really bad idea when both are valid.  Instead, remember
that it was there in a non-canonical way, then look for that in
the one place we really care about it: block captures.  The net
effect closely resembles the behavior of a decl attribute, except
still closely following ARC's standard qualifier parsing rules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253534 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19 02:28:03 +00:00
John McCall a0ee4770fa Fix the emission of ARC-style ivar layouts in the fragile runtime
to start at the offset of the first ivar instead of the rounded-up
end of the superclass.  The latter could include a large amount of
tail padding because of a highly-aligned ivar, and subclass ivars
can be laid out within that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253533 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19 02:27:55 +00:00
Anna Zaks 6975f3c2b4 [analyzer] Improve modeling of static initializers.
Conversions between unrelated pointer types (e.g. char * and void *) involve
bitcasts which were not properly modeled in case of static initializers. The
patch fixes this problem.

The problem was originally spotted by Artem Dergachev. Patched by Yuri Gribov!

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253532 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19 01:25:28 +00:00
David Majnemer 94404b1050 [MS ABI] Let arbitrary entities participate in vftable ordering
In the Microsoft ABI, the vftable is laid out in the order in the
declaration order of the entities defined within it.

Obviously, only virtual methods end up in the vftable but they will be
placed into the table at the same position as the first entity with the
same name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253523 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-19 00:03:54 +00:00
Pete Cooper f88e4c3900 Fix debian build after r253512.
The conversion from QuantityType to the (temporary) IntegerAlignment class
was ambiguous.

For now add in explicit conversion to unsigned to satisfy the clang-x86_64-debian-fast bot.

I'll remove the explicit conversion when I remove the IntegerAlignment class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253519 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 22:53:40 +00:00
Devin Coughlin a121fca3f3 [analyzer] Skip checking blocks in dependent contexts.
Since we don't check functions in dependent contexts, we should skip blocks
in those contexts as well. This avoids an assertion failure when the
DeadStoresChecker attempts to evaluate an array subscript expression with
a dependent name type.

rdar://problem/23564220

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253516 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 22:46:52 +00:00
Pete Cooper 77871bc698 Change memcpy/memset/memmove to have dest and source alignments.
This is a follow on from a similar LLVM commit: r253511.

Note, this was reviewed (and more details are in) http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html

These intrinsics currently have an explicit alignment argument which is
required to be a constant integer.  It represents the alignment of the
source and dest, and so must be the minimum of those.

This change allows source and dest to each have their own alignments
by using the alignment attribute on their arguments.  The alignment
argument itself is removed.

The only code change to clang is hidden in CGBuilder.h which now passes
both dest and source alignment to IRBuilder, instead of taking the minimum of
dest and source alignments.

Reviewed by Hal Finkel.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253512 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 22:18:45 +00:00
David Majnemer 0489066880 [MSVC Compat] Make -Wmicrosoft-cast not an error by default
Too much code is sloppy about this to error by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253506 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 21:42:38 +00:00
David Majnemer 1d4fa1ea4a [Sema] Don't work around a malformed AST
We created a malformed TemplateSpecializationType: it was dependent but
had a RecordType as it's canonical type.  This would lead getAs to
crash.  r249090 worked around this but we should fix this for real by
providing a more appropriate template specialization type as the
canonical type.

This fixes PR24246.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253495 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 19:49:19 +00:00
Aaron Ballman 889279f1c6 Removing the AST matcher test for thread_local storage duration. Not all platforms support TLS, and on platforms that do not support it, use of thread_local causes an error. Since there's no way to determine whether the testing platform supports TLS, there's no way to know whether the test is safe to run or not. I will explore ways to enable this test, but this will appease at least one more build bot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253486 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 18:37:29 +00:00
Betul Buyukkurt 667fbbb052 [PGO] Test update for revision 253484.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253485 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 18:15:55 +00:00
Aaron Ballman 64ba2ebce0 Re-committing r253473 after hopefully fixing the bot breakage. There was a copy-pasta issue that my local testing did not catch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253481 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 17:56:55 +00:00
Douglas Katzman ce63f1d374 [Myriad]: fix test for Windows
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253476 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 17:19:47 +00:00
Aaron Ballman f5ba677028 Reverting r253473 while I investigate build bot failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253475 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 17:16:01 +00:00
Aaron Ballman 9e9a205afb Adding AST matchers for VarDecl storage durations. Can now determine whether a VarDecl has automatic, static, or thread storage duration. This also updates the documentation for matchers, which appear to be missing some previous additions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253473 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 17:05:39 +00:00
Bradley Smith f541bc67f4 [ARM] Support +feature targeting in -mcpu/-march
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253471 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 16:33:48 +00:00
Douglas Katzman 11a671a08f [Myriad]: insert -L paths into linker cmd only when they exist.
Differential Revision: http://reviews.llvm.org/D14754

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253467 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 16:24:46 +00:00
Benjamin Kramer b1dfd66099 [libclang] Add entry points that take a full command line including argv[0].
This provides both a more uniform interface and makes libclang behave like
clang tooling wrt relative paths against argv[0]. This is necessary for
finding paths to a c++ standard library relative to a clang binary given
in a compilation database. It can also be used to find paths relative to
libclang.so if the full path to it is passed in.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253466 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 16:14:27 +00:00
Igor Laevsky 980d9c87b9 Fix tests in order for them to not fail after r252604.
Some expected attributes appear to be incorrect after 
optimizations are run and llvm will strip them. Use -O0
so that llvm will not have a chance to remove them. 



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253458 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 14:40:41 +00:00
Eugene Leviant 9bb501e380 Set flag for lldb when qualified name lookup is being done
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253456 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 12:48:05 +00:00
Rafael Espindola 34886cc46e Update for llvm change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253440 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 06:54:13 +00:00
NAKAMURA Takumi 5dce74fefc BuildUniversalActions(): Prune obsolete \param(s). [-Wdocumentation]
FIXME: Describe BAInputs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253434 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 05:15:21 +00:00