]> granicus.if.org Git - clang/log
clang
10 years agoNo functionality change. Reflow lines that could fit on one line. Break lines
Nick Lewycky [Tue, 1 Oct 2013 21:51:38 +0000 (21:51 +0000)]
No functionality change. Reflow lines that could fit on one line. Break lines
that had 80-column violations. Remove spurious emacs mode markers on .cpp files.

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

10 years agoObjectiveC migrator: When doing migration, migrator must suggest
Fariborz Jahanian [Tue, 1 Oct 2013 21:16:29 +0000 (21:16 +0000)]
ObjectiveC migrator: When doing migration, migrator must suggest
migration of headers which have become system headers by user having put
the .system_framework in the sdk directory.
// rdar://15066802

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

10 years agoRevert commits r190613, r190560 and r190557.
Rafael Espindola [Tue, 1 Oct 2013 17:31:40 +0000 (17:31 +0000)]
Revert commits r190613, r190560 and r190557.

The added a cmake invocation to null builds, making them a lot slower.

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

10 years agoFixing implementation of bittestandset in Intrin.h.
Warren Hunt [Tue, 1 Oct 2013 17:12:40 +0000 (17:12 +0000)]
Fixing implementation of bittestandset in Intrin.h.

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

10 years agoFixed replacements for files with relative paths are not applied.
Ariel J. Bernal [Tue, 1 Oct 2013 14:59:00 +0000 (14:59 +0000)]
Fixed replacements for files with relative paths are not applied.

Replacements were no applied when using a compilation database with paths in the
compilation command relative to the compile directory. This patch makes those
paths abosulte.

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

10 years agoRefactoring: split addTokenToState into two methods.
Alexander Kornienko [Tue, 1 Oct 2013 14:41:18 +0000 (14:41 +0000)]
Refactoring: split addTokenToState into two methods.

Summary: Pure refactoring, should be no semantic changes.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1796

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

10 years agoTypo in ARM __attribute__((interrupt)) documentation
Tim Northover [Tue, 1 Oct 2013 14:39:43 +0000 (14:39 +0000)]
Typo in ARM __attribute__((interrupt)) documentation

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

10 years agoImplement ARM GNU-style interrupt attribute
Tim Northover [Tue, 1 Oct 2013 14:34:25 +0000 (14:34 +0000)]
Implement ARM GNU-style interrupt attribute

This attribute allows users to use a modified C or C++ function as an ARM
exception-handling function and, with care, to successfully return control to
user-space after the issue has been dealt with.

rdar://problem/14207019

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

10 years agoMove checkStringLiteralArgument into Sema class
Tim Northover [Tue, 1 Oct 2013 14:34:18 +0000 (14:34 +0000)]
Move checkStringLiteralArgument into Sema class

It's a useful function to have around for target-specific attributes.

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

10 years agoRun the -cxx-abi test in 32-bit mode as the 64-bit one crashes on the bots
Timur Iskhodzhanov [Tue, 1 Oct 2013 14:10:03 +0000 (14:10 +0000)]
Run the -cxx-abi test in 32-bit mode as the 64-bit one crashes on the bots

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

10 years agoAuthor a FIXME in a test now that PR12784 is fixed
Timur Iskhodzhanov [Tue, 1 Oct 2013 13:56:35 +0000 (13:56 +0000)]
Author a FIXME in a test now that PR12784 is fixed

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

10 years ago[ARM] Add -mfpu=none option to the driver.
Amara Emerson [Tue, 1 Oct 2013 10:20:54 +0000 (10:20 +0000)]
[ARM] Add -mfpu=none option to the driver.

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

10 years ago[OpenMP] Added parsing and semantic analysis for firstprivate clause
Alexey Bataev [Tue, 1 Oct 2013 05:32:34 +0000 (05:32 +0000)]
[OpenMP] Added parsing and semantic analysis for firstprivate clause

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

10 years agoFix computation of linkage within nested lambdas.
Faisal Vali [Tue, 1 Oct 2013 02:51:53 +0000 (02:51 +0000)]
Fix computation of linkage within nested lambdas.

When nested C++11 lambdas are used in NSDMI's - this patch prevents infinite recursion by computing the linkage of any nested lambda by determining the linkage of the outermost enclosing lambda (which might inherit its linkage from its parent).

See http://llvm-reviews.chandlerc.com/D1783 for Doug's approval.

[On a related note, I need this patch so as to pass tests of transformations of nested lambdas returned from member functions]

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

10 years agoFix typo correction usage of SemaAccess.cpp.
Eli Friedman [Tue, 1 Oct 2013 02:44:48 +0000 (02:44 +0000)]
Fix typo correction usage of SemaAccess.cpp.

When we check access for lookup results, make sure we propagate the
result's access to the access control APIs; this can be different from
the natural access of the declaration depending on the path used by the lookup.

PR17394.

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

10 years agoRevert r191586 and r191695. They cause crashes when building with
Richard Smith [Tue, 1 Oct 2013 02:20:23 +0000 (02:20 +0000)]
Revert r191586 and r191695. They cause crashes when building with
-relaxed-aliasing.

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

10 years agoTweak changes in r186464 to avoid a crash.
Eli Friedman [Tue, 1 Oct 2013 00:28:29 +0000 (00:28 +0000)]
Tweak changes in r186464 to avoid a crash.

Currently, IR generation can't handle file-scope compound literals with
non-constant initializers in C++.

Fixes PR17415 (the first crash in the bug).

(We should probably change (T){1,2,3} to use the same codepath as T{1,2,3} in
C++ eventually, given that the semantics of the latter are actually defined by
the standard.)

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

10 years agoRemove support for arrays of runtime bound in C++1y, now they have been voted
Richard Smith [Tue, 1 Oct 2013 00:19:43 +0000 (00:19 +0000)]
Remove support for arrays of runtime bound in C++1y, now they have been voted
out of the working paper. This reverts r179962 and r179992.

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

10 years agoFix PR 12730: Add _GCC_HAVE_SYNC_COMPARE_AND_SWAP macros for ARM
Weiming Zhao [Mon, 30 Sep 2013 22:51:32 +0000 (22:51 +0000)]
Fix PR 12730: Add _GCC_HAVE_SYNC_COMPARE_AND_SWAP macros for ARM

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

10 years agoChanging __X86_64__ to __x86_64__ in Intrin.h.
Warren Hunt [Mon, 30 Sep 2013 21:08:05 +0000 (21:08 +0000)]
Changing __X86_64__ to __x86_64__ in Intrin.h.

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

10 years agoTurn struct-path aware TBAA on by default.
Manman Ren [Mon, 30 Sep 2013 19:35:19 +0000 (19:35 +0000)]
Turn struct-path aware TBAA on by default.

Use -no-struct-path-tbaa to turn it off.

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

10 years agoRemove unused variable introduced in 191666
David Blaikie [Mon, 30 Sep 2013 17:30:41 +0000 (17:30 +0000)]
Remove unused variable introduced in 191666

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

10 years agoAdding intrinsics to the clang front end for the x86 TBM instruction set.
Yunzhong Gao [Mon, 30 Sep 2013 17:25:14 +0000 (17:25 +0000)]
Adding intrinsics to the clang front end for the x86 TBM instruction set.

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

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

10 years agoMoving style option formatting to libFormat
Edwin Vane [Mon, 30 Sep 2013 13:31:48 +0000 (13:31 +0000)]
Moving style option formatting to libFormat

The help text for clang-format's -style option and the function that processes
its value is moved to libFormat in this patch. The goal is to enable other
tools that use libFormat and also have a -style option to behave consistently
with clang-format.

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

10 years agoFix use-after-free.
Manuel Klimek [Mon, 30 Sep 2013 13:29:01 +0000 (13:29 +0000)]
Fix use-after-free.

TemplateDeclInstantiator takes the MultiLevelArgumentList by const-ref
and stores a const-ref member. Thus, we must not pass a temporary
into the constructor.

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

10 years agoclang-format: Improve alignment after 'return'.
Daniel Jasper [Mon, 30 Sep 2013 08:29:03 +0000 (08:29 +0000)]
clang-format: Improve alignment after 'return'.

Previously, comments, could totally confuse it.

Before:
  return
             // true if code is one of a or b.
             code == a ||
         code == b;

After:
  return
      // true if code is one of a or b.
      code == a || code == b;

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

10 years agoAdd a bunch of other GCC '-f' options and ignore them. This covers every
Chandler Carruth [Mon, 30 Sep 2013 07:46:08 +0000 (07:46 +0000)]
Add a bunch of other GCC '-f' options and ignore them. This covers every
such option I've been able to find in the wild in our build system.

Note that I haven't added test cases for this. I can do so if folks
want, but they're *really* boring considering that this is all generated
code to parse and ignore unsued options.

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

10 years agoSwitch one of the ignored boolean flag multiclasses to not have an 'f'
Chandler Carruth [Mon, 30 Sep 2013 03:55:06 +0000 (03:55 +0000)]
Switch one of the ignored boolean flag multiclasses to not have an 'f'
prefix. Sort the ignored boolean 'f' flags at the bottom of this file.
No functionality changed.

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

10 years agoSemaTemplateDeduction.cpp: Suppress a warning. [-Wunused-variable]
NAKAMURA Takumi [Mon, 30 Sep 2013 00:14:27 +0000 (00:14 +0000)]
SemaTemplateDeduction.cpp: Suppress a warning. [-Wunused-variable]

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

10 years agoRevert the linkage fix.
Faisal Vali [Sun, 29 Sep 2013 20:27:06 +0000 (20:27 +0000)]
Revert the linkage fix.
I got a bunch of buildbot failures that i don't understand - sorry.

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

10 years agoRemove an unnecessary overload from ASTLambda.h
Faisal Vali [Sun, 29 Sep 2013 20:15:45 +0000 (20:15 +0000)]
Remove an unnecessary overload from ASTLambda.h
As Richard pointed out to me, dyn_cast is very cheap - there is no real benefit from adding cluttery overloads to only avoid that cast.
No functionality change.

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

10 years agoFix computation of linkage within nested lambdas.
Faisal Vali [Sun, 29 Sep 2013 20:00:15 +0000 (20:00 +0000)]
Fix computation of linkage within nested lambdas.
 When nested lambdas are used in NSDMI's - this prevents infinite recursion.

See http://llvm-reviews.chandlerc.com/D1783 for Doug's approval regarding the code, and then request for some tests.

[On a related note, I need this patch so as to pass tests of transformations of nested lambdas returned from member functions]

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

10 years agoAdd section on VS integration to the ClangFormat documentation.
Manuel Klimek [Sun, 29 Sep 2013 17:49:50 +0000 (17:49 +0000)]
Add section on VS integration to the ClangFormat documentation.

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

10 years agoFix windows newlines :(
Faisal Vali [Sun, 29 Sep 2013 17:08:32 +0000 (17:08 +0000)]
Fix windows newlines :(

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

10 years agoFix misspelling of -fmodules-decluse.
Daniel Jasper [Sun, 29 Sep 2013 12:40:54 +0000 (12:40 +0000)]
Fix misspelling of -fmodules-decluse.

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

10 years agoclang-format: Fix assertion on incomplete string literals.
Daniel Jasper [Sun, 29 Sep 2013 12:02:57 +0000 (12:02 +0000)]
clang-format: Fix assertion on incomplete string literals.

Before, this could would lead to an assert:
  llvm::errs() << "
               << a;

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

10 years agoImplement conversion to function pointer for generic lambdas without captures.
Faisal Vali [Sun, 29 Sep 2013 08:45:24 +0000 (08:45 +0000)]
Implement conversion to function pointer for generic lambdas without captures.

The general strategy is to create template versions of the conversion function and static invoker and then during template argument deduction of the conversion function, create the corresponding call-operator and static invoker specializations, and when the conversion function is marked referenced generate the body of the conversion function using the corresponding static-invoker specialization.  Similarly, Codegen does something similar - when asked to emit the IR for a specialized static invoker of a generic lambda, it forwards emission to the corresponding call operator.

This patch has been reviewed in person both by Doug and Richard.  Richard gave me the LGTM.

A few minor changes:
  - per Richard's request i added a simple check to gracefully inform that captures (init, explicit or default) have not been added to generic lambdas just yet (instead of the assertion violation).
  - I removed a few lines of code that added the call operators instantiated parameters to the currentinstantiationscope. Not only did it not handle parameter packs, but it is more relevant in the patch for nested lambdas which will follow this one, and fix that problem more comprehensively.
  - Doug had commented that the original implementation strategy of using the TypeSourceInfo of the call operator to create the static-invoker was flawed and allowed const as a member qualifier to creep into the type of the static-invoker.  I currently kludge around it - but after my initial discussion with Doug, with a follow up session with Richard, I have added a FIXME so that a more elegant solution that involves the use of TrivialTypeSourceInfo call followed by the correct wiring of the template parameters to the functionprototypeloc is forthcoming.

Thanks!

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

10 years agoAdd character set related __STDC_* definitions.
Ed Schouten [Sun, 29 Sep 2013 07:54:52 +0000 (07:54 +0000)]
Add character set related __STDC_* definitions.

Clang uses UTF-16 and UTF-32 for its char16_t's and char32_t's
exclusively. This means that we can define __STDC_UTF_16__ and
__STDC_UTF_32__ unconditionally.

While there, define __STDC_MB_MIGHT_NEQ_WC__ for FreeBSD. FreeBSD's
wchar_t's don't encode characters as ISO-10646; the encoding depends on
the locale used. Because the character set used might not be a superset
of ASCII, we must define __STDC_MB_MIGHT_NEQ_WC__.

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

10 years agoImplement C++1y sized deallocation (n3778). This is not enabled by -std=c++1y;
Richard Smith [Sun, 29 Sep 2013 04:40:38 +0000 (04:40 +0000)]
Implement C++1y sized deallocation (n3778). This is not enabled by -std=c++1y;
instead, it's enabled by the -cc1 flag -fsized-deallocation, until we sort out
the backward-compatibility issues.

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

10 years agoRemove commented-out entry for ARBs, they're not in C++1y any more.
Richard Smith [Sat, 28 Sep 2013 19:09:34 +0000 (19:09 +0000)]
Remove commented-out entry for ARBs, they're not in C++1y any more.

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

10 years agoThe second parameter of nexttoward is always long double.
Benjamin Kramer [Sat, 28 Sep 2013 17:41:03 +0000 (17:41 +0000)]
The second parameter of nexttoward is always long double.

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

10 years agoDocumentation: minor fixes/improvements to documentation of DependentScopeDeclRefExpr.
James Dennett [Sat, 28 Sep 2013 16:30:01 +0000 (16:30 +0000)]
Documentation: minor fixes/improvements to documentation of DependentScopeDeclRefExpr.

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

10 years agoMake helper function static.
Benjamin Kramer [Sat, 28 Sep 2013 15:08:41 +0000 (15:08 +0000)]
Make helper function static.

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

10 years agoRefactor comment merging.
Benjamin Kramer [Sat, 28 Sep 2013 15:06:27 +0000 (15:06 +0000)]
Refactor comment merging.

- We scan for whitespace between comments anyways, remember any newlines seen
  along the way.
- Use this newline number to decide whether two comments are adjacent.
- Since the newline check is now free remove the caching and unused code.
- Remove unnecessary boolean state from the comment list.
- No behavioral change.

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

10 years agoSeparate construction of bi-arch path suffix from construction of
Simon Atanasyan [Sat, 28 Sep 2013 13:45:11 +0000 (13:45 +0000)]
Separate construction of bi-arch path suffix from construction of
multi-library path suffix.

The code calculates MIPS toolchain specific multi-lib path suffixes like
mips16/soft-float/el is moved to the separate function
findMultiLibSuffix(). This function called during GCC installation
detection and result is stored for the future using.

The patch reviewed by Rafael Espindola.
http://llvm-reviews.chandlerc.com/D1738

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

10 years agoAdd compat/extension warnings for init captures.
Richard Smith [Sat, 28 Sep 2013 05:38:27 +0000 (05:38 +0000)]
Add compat/extension warnings for init captures.

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

10 years agoAdd extra testing for init-captures.
Richard Smith [Sat, 28 Sep 2013 05:23:21 +0000 (05:23 +0000)]
Add extra testing for init-captures.

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

10 years agoMark lambda init-captures as complete.
Richard Smith [Sat, 28 Sep 2013 04:37:56 +0000 (04:37 +0000)]
Mark lambda init-captures as complete.

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

10 years agoSwitch from putting init capture VarDecls in the surrounding DeclContext to
Richard Smith [Sat, 28 Sep 2013 04:31:26 +0000 (04:31 +0000)]
Switch from putting init capture VarDecls in the surrounding DeclContext to
putting them in the call operator's DeclContext. This better matches the
language wording and avoids some cases where code gets confused by them for
namespace-scope lambdas and the like.

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

10 years agoPer latest drafting, switch to implementing init-captures as if by declaring
Richard Smith [Sat, 28 Sep 2013 04:02:39 +0000 (04:02 +0000)]
Per latest drafting, switch to implementing init-captures as if by declaring
and capturing a variable declaration, and complete the implementation of them.

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

10 years ago[analyzer] Make inlining decisions based on the callee being variadic.
Jordan Rose [Sat, 28 Sep 2013 02:04:19 +0000 (02:04 +0000)]
[analyzer] Make inlining decisions based on the callee being variadic.

...rather than trying to figure it out from the call site, and having
people complain that we guessed wrong and that a prototype-less call is
the same as a variadic call on their system. More importantly, fix a
crash when there's no decl at the call site (though we could have just
returned a default value).

<rdar://problem/15037033>

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

10 years agoTypo correction: _int64 -> __int64.
Warren Hunt [Sat, 28 Sep 2013 00:15:41 +0000 (00:15 +0000)]
Typo correction: _int64 -> __int64.

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

10 years agoImplements some of the more commonly used intrinsics in Intrin.h
Warren Hunt [Fri, 27 Sep 2013 23:57:26 +0000 (23:57 +0000)]
Implements some of the more commonly used intrinsics in Intrin.h
Differential Revision: http://llvm-reviews.chandlerc.com/D1766

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

10 years agoDon't suggest namespaces if the next token is a '.'
Kaelyn Uhrain [Fri, 27 Sep 2013 23:54:23 +0000 (23:54 +0000)]
Don't suggest namespaces if the next token is a '.'

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

10 years agoTBAA: use the same format for scalar TBAA and struct-path aware TBAA.
Manman Ren [Fri, 27 Sep 2013 23:06:41 +0000 (23:06 +0000)]
TBAA: use the same format for scalar TBAA and struct-path aware TBAA.

Struct-path aware TBAA generates tags to specify the access path,
while scalar TBAA only generates tags to scalar types.

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

10 years agoObjectiveC migrator. Infer property from getters only
Fariborz Jahanian [Fri, 27 Sep 2013 22:55:54 +0000 (22:55 +0000)]
ObjectiveC migrator. Infer property from getters only
if property name is a valid identifier in the underlying
language. // rdar://15044184

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

10 years agoImplementation of N3760 which is planned to be voted into C++14's draft
Chandler Carruth [Fri, 27 Sep 2013 22:30:27 +0000 (22:30 +0000)]
Implementation of N3760 which is planned to be voted into C++14's draft
tomorrow is complete.

There is a missing warning due to a serious issue with template
instantiation in Clang (and potentially in the core language).

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

10 years agoFix a bug where we failed to diagnose class template specialization
Chandler Carruth [Fri, 27 Sep 2013 22:14:40 +0000 (22:14 +0000)]
Fix a bug where we failed to diagnose class template specialization
uses.

This fixes one of the two remaining failures to implement [[deprecated]]
as specified for C++14.

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

10 years agoNote that modules are supported for C/Objective-C, and have syntax in ObjC.
Douglas Gregor [Fri, 27 Sep 2013 21:23:28 +0000 (21:23 +0000)]
Note that modules are supported for C/Objective-C, and have syntax in ObjC.

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

10 years agodocs: Document CXXLiteralOperatorName and CXXUsingDirective
Justin Bogner [Fri, 27 Sep 2013 21:10:54 +0000 (21:10 +0000)]
docs: Document CXXLiteralOperatorName and CXXUsingDirective

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

10 years agodocs: Remove note about Identifiers being used for C++ operators
Justin Bogner [Fri, 27 Sep 2013 21:10:51 +0000 (21:10 +0000)]
docs: Remove note about Identifiers being used for C++ operators

C++ operators are represented by CXXOperatorName now, which is already
documented.

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

10 years agoUpdate the help text.
Rafael Espindola [Fri, 27 Sep 2013 20:42:38 +0000 (20:42 +0000)]
Update the help text.

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

10 years agoReplace -fobjc-default-synthesize-properties with disable-objc-default-synthesize...
Rafael Espindola [Fri, 27 Sep 2013 20:21:48 +0000 (20:21 +0000)]
Replace -fobjc-default-synthesize-properties with disable-objc-default-synthesize-properties.

We want the modern behavior most of the time, so inverting the option simplifies
the driver and the tests.

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

10 years agoImplement N3760, support for the [[deprecated]] attribute.
Chandler Carruth [Fri, 27 Sep 2013 20:20:17 +0000 (20:20 +0000)]
Implement N3760, support for the [[deprecated]] attribute.

This motion appears to have consensus in the C++ committee and is
expected to be voted into the C++14 draft tomorrow during the formal
vote.

No extension warning in C++11 as attributes not specified in the
standard using the standard syntax in C++11 have implementation defined
meaning, and we define the meaning proposed for C++14.

There is one bug exposed as we do not warn on a deprecated template
specialization. I've left a FIXME in the test case and will dig into
that next.

Also, I will add a few more exhaustive test cases of the other features
specified for this attribute in a follow-up commit.

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

10 years agoMark variable template implementation as complete. Nearly all of the credit
Richard Smith [Fri, 27 Sep 2013 20:19:41 +0000 (20:19 +0000)]
Mark variable template implementation as complete. Nearly all of the credit
here goes to Larisse Voufo.

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

10 years agoVariable templates: handle instantiation of static data member templates
Richard Smith [Fri, 27 Sep 2013 20:14:12 +0000 (20:14 +0000)]
Variable templates: handle instantiation of static data member templates
appropriately, especially when they appear within class templates.

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

10 years agoComment out links for papers that aren't up yet.
Richard Smith [Fri, 27 Sep 2013 19:55:03 +0000 (19:55 +0000)]
Comment out links for papers that aren't up yet.

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

10 years agoDon't give suggest things like function names on the left side of "=".
Kaelyn Uhrain [Fri, 27 Sep 2013 19:40:16 +0000 (19:40 +0000)]
Don't give suggest things like function names on the left side of "=".

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

10 years agoAvoid the hard-coded limit on the number of typo corrections attempted.
Kaelyn Uhrain [Fri, 27 Sep 2013 19:40:12 +0000 (19:40 +0000)]
Avoid the hard-coded limit on the number of typo corrections attempted.

Move some tests from typo-correction.cpp to typo-correction-pt2.cpp
because they were running afoul of the hard-coded limit of 20 typos
corrected. Some of the tests after it were still working due to the
limit not applying to cached corrections and in cases where a non-NULL
MemberContext is passed in to Sema::CorrectTypo.  Most of the moved tests
still passed after being moved, but the test involving "data_struct" had
only been passing because the test had exceeded that limit so a fix for
it is also included (most of the changes to ParseStmt.cpp are shared with
and originated from another typo correction impovement that was split
into a separate commit).

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

10 years agoCache the location of failed typo corrections so that typo correction
Kaelyn Uhrain [Fri, 27 Sep 2013 19:40:08 +0000 (19:40 +0000)]
Cache the location of failed typo corrections so that typo correction
isn't repeatedly attempted for the same identifier at the same location.

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

10 years agoFix typo: Dellocation.
Benjamin Kramer [Fri, 27 Sep 2013 19:35:09 +0000 (19:35 +0000)]
Fix typo: Dellocation.

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

10 years agoFix formatting goof.
Richard Smith [Fri, 27 Sep 2013 19:12:22 +0000 (19:12 +0000)]
Fix formatting goof.

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

10 years agoUpdate status:
Richard Smith [Fri, 27 Sep 2013 19:11:33 +0000 (19:11 +0000)]
Update status:
 * generic lambdas are now partially supported
 * add papers from formal motions in committee

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

10 years agoclang-cl: pass /FI options to fallback
Hans Wennborg [Fri, 27 Sep 2013 17:54:18 +0000 (17:54 +0000)]
clang-cl: pass /FI options to fallback

We started parsing /FI in r191442, and now we can pass it on to the
fallback too.

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

10 years agoAdding pre/post conditions for some Replacement handling functions
Edwin Vane [Fri, 27 Sep 2013 17:52:45 +0000 (17:52 +0000)]
Adding pre/post conditions for some Replacement handling functions

The vector version of shiftedCodePosition() requires Replacements to be
in sorted order.

Turned existing comment about sorting for deduplicate() into an exact
post condition.

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

10 years agoSourceManager: Open code isInMainFile.
Benjamin Kramer [Fri, 27 Sep 2013 17:12:50 +0000 (17:12 +0000)]
SourceManager: Open code isInMainFile.

- We really shouldn't compute line numbers for every file that is asked if it's
  the main file, it destroys the lazy computation.
- Invalid locations are no longer accounted to the main file, no other
  functionality change.

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

10 years agoQuick-fix the test for no-asserts build
Timur Iskhodzhanov [Fri, 27 Sep 2013 17:07:56 +0000 (17:07 +0000)]
Quick-fix the test for no-asserts build

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

10 years agoRemove method that always returns true.
Rafael Espindola [Fri, 27 Sep 2013 16:58:26 +0000 (16:58 +0000)]
Remove method that always returns true.

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

10 years ago[analyzer] Allow pre/post-statement checkers for UnaryOperator.
Jordan Rose [Fri, 27 Sep 2013 16:47:52 +0000 (16:47 +0000)]
[analyzer] Allow pre/post-statement checkers for UnaryOperator.

Found by Arthur Yoo.

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

10 years agoFix the test files by removing the unnecessary -emit-llvm flag (should address Matt...
Faisal Vali [Fri, 27 Sep 2013 16:45:48 +0000 (16:45 +0000)]
Fix the test files by removing the unnecessary -emit-llvm flag (should address Matt Beaumont-Gay's concern regarding failure on a read-only filesystem)

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

10 years agoAdded a comment and another test for the UT_ForIndentation option
Alexander Kornienko [Fri, 27 Sep 2013 16:40:11 +0000 (16:40 +0000)]
Added a comment and another test for the UT_ForIndentation option

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

10 years agoUpdated examples of UseTab option
Alexander Kornienko [Fri, 27 Sep 2013 16:19:25 +0000 (16:19 +0000)]
Updated examples of UseTab option

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

10 years agoUpdated clang-format style options doc.
Alexander Kornienko [Fri, 27 Sep 2013 16:16:55 +0000 (16:16 +0000)]
Updated clang-format style options doc.

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

10 years agoImplemented tab usage only for indentation (http://llvm.org/PR17363)
Alexander Kornienko [Fri, 27 Sep 2013 16:14:22 +0000 (16:14 +0000)]
Implemented tab usage only for indentation (http://llvm.org/PR17363)

Summary:
Changed UseTab to be a enum with three options: Never, Always,
ForIndentation (true/false are still supported when reading .clang-format).
IndentLevel should currently be propagated correctly for all tokens, except for
block comments. Please take a look at the general idea before I start dealing
with block comments.

Reviewers: klimek, djasper

Reviewed By: klimek

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

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

10 years agoAbstract out the emission of vtables, add basic support for vtable emission when...
Timur Iskhodzhanov [Fri, 27 Sep 2013 14:48:01 +0000 (14:48 +0000)]
Abstract out the emission of vtables, add basic support for vtable emission when using -cxx-abi microsoft

Reviewed at http://llvm-reviews.chandlerc.com/D1532

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

10 years agoCorrectly indent with tabs when whitespace starts from the column not divisible by...
Alexander Kornienko [Fri, 27 Sep 2013 09:45:40 +0000 (09:45 +0000)]
Correctly indent with tabs when whitespace starts from the column not divisible by TabWidth.

Summary:
The width of the first inserted tab character depends on the initial
column, so we need to handle the first tab in a special manner.

Reviewers: klimek, djasper

Reviewed By: klimek

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

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

10 years agoclang-format: Improve formatting of functions with multiple trailing tokens.
Daniel Jasper [Fri, 27 Sep 2013 08:29:16 +0000 (08:29 +0000)]
clang-format: Improve formatting of functions with multiple trailing tokens.

Before:
  void SomeFunction(aaaaaaaaaaaaaaaaaaaaaaaaaa,
                    aaaaaaaaaaaaaaaaaaaaaaaaaa) override
  final;

After:
  void SomeFunction(aaaaaaaaaaaaaaaaaaaaaaaaaa,
                    aaaaaaaaaaaaaaaaaaaaaaaaaa) override final;

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

10 years agoAST: Handle multidimensional arrays inside of __uuidof()
David Majnemer [Fri, 27 Sep 2013 07:57:34 +0000 (07:57 +0000)]
AST: Handle multidimensional arrays inside of __uuidof()

We previously handled one-dimensional arrays but didn't consider the
general case.  The fix is simple: keep going through subsequent
dimensions until we get to the base element.

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

10 years agoclang-format: Fix formatting bug with comment in weird place.
Daniel Jasper [Fri, 27 Sep 2013 07:49:08 +0000 (07:49 +0000)]
clang-format: Fix formatting bug with comment in weird place.

Before:
  template <typename T>
  // T should be one of {A, B}.
      void f() {}

After:
  template <typename T>
  // T should be one of {A, B}.
  void f() {}

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

10 years agoAST: Handle qualified array types in typeid() expressions
David Majnemer [Fri, 27 Sep 2013 07:04:31 +0000 (07:04 +0000)]
AST: Handle qualified array types in typeid() expressions

The intent of getTypeOperand() was to yield an unqualified type.
However QualType::getUnqualifiedType() does not strip away qualifiers on
arrays.

N.B.  This worked fine when typeid() was applied to an expression
because we would inject as implicit cast to the unqualified array type
in the AST.

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

10 years agoAdd -fno-unsigned-char and ignore it. We already support -fno-signed-char, add
Nick Lewycky [Fri, 27 Sep 2013 05:06:31 +0000 (05:06 +0000)]
Add -fno-unsigned-char and ignore it. We already support -fno-signed-char, add
both flags to the driver test.

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

10 years agoNumericLiteralParser::ParseNumberStartingWithZero(): Try to appease MSC16's miscompil...
NAKAMURA Takumi [Fri, 27 Sep 2013 04:42:28 +0000 (04:42 +0000)]
NumericLiteralParser::ParseNumberStartingWithZero(): Try to appease MSC16's miscompilation.

Investigating yet. It seems msc16 miscompiles s[1] to be folded.

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

10 years agoSema: Respect -fdelayed-template-parsing when parsing constexpr functions
David Majnemer [Fri, 27 Sep 2013 04:14:12 +0000 (04:14 +0000)]
Sema: Respect -fdelayed-template-parsing when parsing constexpr functions

Functions declared as constexpr must have their parsing delayed in
-fdelayed-template-parsing mode so as not to upset later template
instantiation.

N.B. My reading of the standard makes it seem like delayed template
parsing is at odds with constexpr.  We may want to make refinements in
other places in clang to make constexpr play nicer with this feature.

This fixes PR17334.

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

10 years agoRemove some stray underscores from copyright block. Fix first line length to match...
Craig Topper [Fri, 27 Sep 2013 03:57:18 +0000 (03:57 +0000)]
Remove some stray underscores from copyright block. Fix first line length to match length of the one after the copyright block.

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

10 years agoObjectiveC migrator: Donlt annotate NS_RETURNS_INNER_POINTER
Fariborz Jahanian [Thu, 26 Sep 2013 22:43:41 +0000 (22:43 +0000)]
ObjectiveC migrator: Donlt annotate NS_RETURNS_INNER_POINTER
on class methods, as it makes no sense. // rdar://15069200

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

10 years agoObjectiveC migrator: function pointer is not an
Fariborz Jahanian [Thu, 26 Sep 2013 21:43:47 +0000 (21:43 +0000)]
ObjectiveC migrator: function pointer is not an
inner pointer for annotation to
objc_returns_inner_pointer purposes.
// rdar://15044991

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

10 years agoDebug info: Fix a crash when trying to construct a type with redundant
Adrian Prantl [Thu, 26 Sep 2013 21:35:50 +0000 (21:35 +0000)]
Debug info: Fix a crash when trying to construct a type with redundant
ownership qualifiers.
Fixes rdar://problem/14990656.

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

10 years agoRemove an unused variable - thanks to Nick Lewycky for pointing this out!
Faisal Vali [Thu, 26 Sep 2013 21:32:23 +0000 (21:32 +0000)]
Remove an unused variable - thanks to Nick Lewycky for pointing this out!

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

10 years agoFix error recovery when a return type correction includes a new name specifier.
Kaelyn Uhrain [Thu, 26 Sep 2013 21:13:05 +0000 (21:13 +0000)]
Fix error recovery when a return type correction includes a new name specifier.

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

10 years agoFix up fallout from r187156.
Bob Wilson [Thu, 26 Sep 2013 21:00:51 +0000 (21:00 +0000)]
Fix up fallout from r187156.

The previous change caused the driver to translate -Wa,-L to the
-msave-temp-labels option for cc1as, but cc1as did not accept that option.
This patch follows the same approach used for similar options (-relax-all,
-noexecstack) in the previous patch.

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