of out-of-line c++ method definition which happens
to be inside an objc class implementation
until I can figure out how to do it. This is to fix
a broken project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159772
91177308-0d34-0410-b5e6-
96231b3b80d8
// Look at the next token to make sure that this isn't a function
// declaration. We have to check this because __attribute__ might be the
// start of a function definition in GCC-extended K&R C.
- !isDeclarationAfterDeclarator()) {
+ !isDeclarationAfterDeclarator() &&
+ (!CurParsedObjCImpl || Tok.isNot(tok::l_brace) ||
+ (getLangOpts().CPlusPlus && D.getCXXScopeSpec().isSet()))) {
if (isStartOfFunctionDefinition(D)) {
if (DS.getStorageClassSpec() == DeclSpec::SCS_typedef) {
Tok.is(tok::kw_asm) || // int X() __asm__ -> not a function def
Tok.is(tok::kw___attribute) || // int X() __attr__ -> not a function def
(getLangOpts().CPlusPlus &&
- Tok.is(tok::l_paren)) || // int X(0) -> not a function def [C++]
- (CurParsedObjCImpl &&
- Tok.is(tok::l_brace)); // C-function nested in an @implementation
+ Tok.is(tok::l_paren)); // int X(0) -> not a function def [C++]
}
/// \brief Determine whether the current token, if it occurs after a
struct X {
X();
+void SortWithCollator();
};
@interface MyClass
int x{17};
X::X() = default;
-
+void X::SortWithCollator() {}
@end