File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,9 @@ bool ExpandAutoType::prepare(const Selection& Inputs) {
61
61
if (auto *Node = Inputs.ASTSelection .commonAncestor ()) {
62
62
if (auto *TypeNode = Node->ASTNode .get <TypeLoc>()) {
63
63
if (const AutoTypeLoc Result = TypeNode->getAs <AutoTypeLoc>()) {
64
- CachedLocation = Result;
64
+ // Code in apply() does handle 'decltype(auto)' yet.
65
+ if (!Result.getTypePtr ()->isDecltypeAuto ())
66
+ CachedLocation = Result;
65
67
}
66
68
}
67
69
}
Original file line number Diff line number Diff line change @@ -528,6 +528,8 @@ TEST_F(ExpandAutoTypeTest, Test) {
528
528
// replace array types
529
529
EXPECT_EQ (apply (R"cpp( au^to x = "test")cpp" ),
530
530
R"cpp( const char * x = "test")cpp" );
531
+
532
+ EXPECT_UNAVAILABLE (" dec^ltype(au^to) x = 10;" );
531
533
}
532
534
533
535
TWEAK_TEST (ExtractFunction);
You can’t perform that action at this time.
0 commit comments