This reverts commit r239846 and r239879. They caused clang's
-fms-extensions behavior to incorrectly parse lambdas and includes a
testcase to ensure we don't regress again.
This issue was found in PR24027.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241668
91177308-0d34-0410-b5e6-
96231b3b80d8
def warn_pragma_unroll_cuda_value_in_parens : Warning<
"argument to '#pragma unroll' should not be in parentheses in CUDA C/C++">,
InGroup<CudaCompat>;
-
-def err_empty_attribute_block : Error<
- "Microsoft attribute block cannot be empty">;
-
} // end of Parse Issue category.
let CategoryName = "Modules Issue" in {
return EndLoc;
}
-/// Parse one or more Microsoft-style attributes [Attr]
+/// ParseMicrosoftAttributes - Parse Microsoft attributes [Attr]
///
/// [MS] ms-attribute:
/// '[' token-seq ']'
// FIXME: If this is actually a C++11 attribute, parse it as one.
BalancedDelimiterTracker T(*this, tok::l_square);
T.consumeOpen();
- if (Tok.is(tok::r_square))
- Diag(T.getOpenLocation(), diag::err_empty_attribute_block);
SkipUntil(tok::r_square, StopAtSemi | StopBeforeMatch);
T.consumeClose();
if (endLoc)
[unbalanced(attribute) /* expected-note {{to match this '['}} */
void f(void); /* expected-error {{expected ']'}} */
-[] __interface I {}; /* expected-error {{Microsoft attribute block cannot be empty}} */
-
void ms_intrinsics(int a) {
__noop();
__assume(a);
static_assert(__alignof(struct align_before_key2) == 16, "");
static_assert(__alignof(struct align_before_key3) == 16, "");
}
+
+namespace PR24027 {
+struct S {
+ template <typename T>
+ S(T);
+} f([] {});
+}