| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Actual usage in Sema for collapsing loops will in some future patch.
llvm-svn: 209660
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR11170)
The previous code that was supposed to handle this didn't work
since parsing of inline method definitions is delayed to the end
of the outer class definition. Thus, when HandleTagDeclDefinition()
got called for the inner class, the inline functions in that class
had not been parsed yet.
Richard suggested that the way to do this is by handling inline
method definitions through a new ASTConsumer callback.
I really wanted to call ASTContext::DeclMustBeEmitted() instead of
checking for attributes, but doing that causes us to compute linkage,
and then we fail with "error: unsupported: typedef changes linkage
of anonymous type, but linkage was already computed" on tests like
this: (from SemaCXX/undefined-internal.cpp) :-/
namespace test7 {
typedef struct {
void bar();
void foo() { bar(); }
} A;
}
Differential Revision: http://reviews.llvm.org/D3809
llvm-svn: 209549
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'optnone'.
This patch implements support for selectively disabling optimizations on a
range of function definitions through a pragma. The implementation is that
all function definitions in the range are decorated with attribute
'optnone'.
#pragma clang optimize off
// All function definitions in here are decorated with 'optnone'.
#pragma clang optimize on
// Compilation resumes as normal.
llvm-svn: 209510
|
|
|
|
|
|
|
|
|
| |
Make better diagnostic produced by erroneous switch statement.
It fixes PR19022.
Differential Revision: http://reviews.llvm.org/D3137
llvm-svn: 209302
|
|
|
|
| |
llvm-svn: 209275
|
|
|
|
| |
llvm-svn: 208943
|
|
|
|
|
|
| |
that isn't always wrong.
llvm-svn: 208844
|
|
|
|
|
|
| |
type-id in a cast-expression.
llvm-svn: 208843
|
|
|
|
| |
llvm-svn: 208516
|
|
|
|
| |
llvm-svn: 208475
|
|
|
|
| |
llvm-svn: 208366
|
|
|
|
|
|
|
|
|
|
| |
Fix for PR19176. Clang will suggest a fix-it hint for cases like:
int arr[] = {1, 2, 3, 4};
for (auto i = arr)
^
:
llvm-svn: 208299
|
|
|
|
| |
llvm-svn: 208077
|
|
|
|
|
|
| |
clause 'proc_bind'
llvm-svn: 208060
|
|
|
|
| |
llvm-svn: 208011
|
|
|
|
| |
llvm-svn: 207921
|
|
|
|
|
|
|
|
| |
apply the NRVO candidate flag to all possible NRVO candidates here, and remove the flags in computeNRVO or upon template instantiation. A variable now has NRVO applied if and only if every return statement in that scope returns that variable. This is nearly optimal.
Performs NRVO roughly 7% more often in a bootstrap build of clang. Patch co-authored by Richard Smith.
llvm-svn: 207890
|
|
|
|
| |
llvm-svn: 207883
|
|
|
|
|
|
|
|
|
| |
These calls to ConsumeCodeCompletionToken() caused parsing to continue
needlessly when an immediate cutOffParsing() would do.
Document the function to clarify its correct usage.
llvm-svn: 207823
|
|
|
|
|
|
|
|
|
|
|
| |
class template member classes (PR19613)
Also improve this code in general by implementing suggestions
from Richard.
Differential Revision: http://reviews.llvm.org/D3555?id=9020
llvm-svn: 207822
|
|
|
|
| |
llvm-svn: 207040
|
|
|
|
| |
llvm-svn: 207013
|
|
|
|
|
|
| |
Patch by Yuri Gorshenin.
llvm-svn: 206970
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D3272
llvm-svn: 206891
|
|
|
|
|
|
| |
template-id after its scope specifier into a single place.
llvm-svn: 206442
|
|
|
|
| |
llvm-svn: 206237
|
|
|
|
|
|
| |
post-commit review feedback. Amends r206186.
llvm-svn: 206229
|
|
|
|
|
|
|
|
|
|
| |
argument lists when the arguments are elided. eg)
__declspec(deprecated()) // error
__declspec(deprecated) // OK
__declspec(deprecated("")) // OK
llvm-svn: 206191
|
|
|
|
|
|
|
|
|
|
|
| |
when the arguments are elided. eg)
[[deprecated()]] // error
[[deprecated]] // OK
[[deprecated("")]] // OK
[[gnu::deprecated()]] // OK
llvm-svn: 206186
|
|
|
|
|
|
|
|
|
|
| |
Parse of nested name spacifier is modified so that it properly recovers
if colon is mistyped as double colon in case statement.
This patch fixes PR15133.
Differential Revision: http://llvm-reviews.chandlerc.com/D2870
llvm-svn: 206135
|
|
|
|
|
|
| |
properly.
llvm-svn: 206128
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support for the msvc pragmas section, bss_seg, code_seg,
const_seg and data_seg as well as support for __declspec(allocate()).
Additionally it corrects semantics and adds diagnostics for
__attribute__((section())) and the interaction between the attribute
and the msvc pragmas and declspec. In general conflicts should now be
well diganosed within and among these features.
In supporting the pragmas new machinery for uniform lexing for
msvc pragmas was introduced. The new machinery always lexes the
entire pragma and stores it on an annotation token. The parser
is responsible for parsing the pragma when the handling the
annotation token.
There is a known outstanding bug in this implementation in C mode.
Because these attributes and pragmas apply _only_ to definitions, we
process them at the time we detect a definition. Due to tentative
definitions in C, we end up processing the definition late. This means
that in C mode, everything that ends up in a BSS section will end up in
the _last_ BSS section rather than the one that was live at the time of
tentative definition, even if that turns out to be the point of actual
definition. This issue is not known to impact anything as of yet
because we are not aware of a clear use or use case for #pragma bss_seg
but should be fixed at some point.
Differential Revision=http://reviews.llvm.org/D3065#inline-16241
llvm-svn: 205810
|
|
|
|
|
|
|
|
|
|
|
| |
It is very similar to GCC's __PRETTY_FUNCTION__, except it prints the
calling convention.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D3311
llvm-svn: 205780
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By ignoring this pragma with a warning, we're essentially miscompiling
the user's program. WebKit / Blink use this pragma to disable dynamic
initialization and finalization of some static data, and running the
dtors crashes the program.
Error out for now, so that /fallback compiles the TU correctly with
MSVC. This pragma should be implemented some time this month, and we
can remove this hack.
llvm-svn: 205554
|
|
|
|
|
|
|
|
|
|
|
|
| |
at ... )')
For namespaces, this is consistent with mangling and GCC's debug info
behavior. For structs, GCC uses <anonymous struct> but we prefer
consistency between all anonymous entities but don't want to confuse
them with template arguments, etc, so we'll just go with parens in all
cases.
llvm-svn: 205398
|
|
|
|
|
|
|
|
| |
argument parsing code.
This removes a diagnostic that is no longer required (the semantic engine now properly handles attribute syntax so __declspec and __attribute__ spellings no longer get mismatched). This caused several testcases to need updating for a slightly different wording.
llvm-svn: 205234
|
|
|
|
|
|
| |
arguments that is currently being used by GNU and C++-style attributes. This allows C++11 attributes with argument lists to be handled properly, fixing the "deprecated", "type_visibility", and capability-related attributes with arguments.
llvm-svn: 205226
|
|
|
|
| |
llvm-svn: 205164
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When parsing MS inline assembly, we note that fpsw is an implicit def of
most x87 FP operations, and add it to the clobber list. However, we
don't recognize fpsw as a gcc register name, and we assert. Clang
always adds an fpsr clobber, which means the same thing to LLVM, so we
can just use that.
This test case was broken by my LLVM change r196939.
Reviewers: echristo
Differential Revision: http://llvm-reviews.chandlerc.com/D2993
llvm-svn: 204878
|
|
|
|
|
|
| |
when modules are disabled. // rdar://15505492
llvm-svn: 204862
|
|
|
|
| |
llvm-svn: 204569
|
|
|
|
| |
llvm-svn: 204428
|
|
|
|
|
|
|
| |
Based on a patch and test by Stephan Tolksdorf! Refactoring and fixing adjacent
brokenness by me.
llvm-svn: 203733
|
|
|
|
|
|
| |
class.
llvm-svn: 203641
|
|
|
|
| |
llvm-svn: 203628
|
|
|
|
|
|
| |
the parameter list wasn't present.
llvm-svn: 203565
|
|
|
|
| |
llvm-svn: 203389
|
|
|
|
|
|
| |
This compiles cleanly with lldb/lld/clang-tools-extra/llvm.
llvm-svn: 203279
|
|
|
|
| |
llvm-svn: 203087
|
|
|
|
| |
llvm-svn: 203078
|