Author: rtrieu Date: Fri Aug 5 20:44:06 2016 New Revision: 277900 URL: http://llvm.org/viewvc/llvm-project?rev=277900&view=rev Log: Fix typos from r277797 and unused variable from r277889.
Modified: cfe/trunk/lib/AST/ASTDiagnostic.cpp cfe/trunk/test/SemaCXX/return-stack-addr-2.cpp Modified: cfe/trunk/lib/AST/ASTDiagnostic.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTDiagnostic.cpp?rev=277900&r1=277899&r2=277900&view=diff ============================================================================== --- cfe/trunk/lib/AST/ASTDiagnostic.cpp (original) +++ cfe/trunk/lib/AST/ASTDiagnostic.cpp Fri Aug 5 20:44:06 2016 @@ -938,13 +938,13 @@ class TemplateDiff { /// isEnd - Returns true if the iterator is one past the end. bool isEnd() const { - assert(TST && "InternalalIterator is invalid with a null TST."); + assert(TST && "InternalIterator is invalid with a null TST."); return Index >= TST->getNumArgs(); } /// &operator++ - Increment the iterator to the next template argument. InternalIterator &operator++() { - assert(TST && "InternalalIterator is invalid with a null TST."); + assert(TST && "InternalIterator is invalid with a null TST."); if (isEnd()) { return *this; } @@ -980,7 +980,7 @@ class TemplateDiff { /// operator* - Returns the appropriate TemplateArgument. reference operator*() const { - assert(TST && "InternalalIterator is invalid with a null TST."); + assert(TST && "InternalIterator is invalid with a null TST."); assert(!isEnd() && "Index exceeds number of arguments."); if (CurrentTA == EndTA) return TST->getArg(Index); @@ -990,7 +990,7 @@ class TemplateDiff { /// operator-> - Allow access to the underlying TemplateArgument. pointer operator->() const { - assert(TST && "InternalalIterator is invalid with a null TST."); + assert(TST && "InternalIterator is invalid with a null TST."); return &operator*(); } }; Modified: cfe/trunk/test/SemaCXX/return-stack-addr-2.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/return-stack-addr-2.cpp?rev=277900&r1=277899&r2=277900&view=diff ============================================================================== --- cfe/trunk/test/SemaCXX/return-stack-addr-2.cpp (original) +++ cfe/trunk/test/SemaCXX/return-stack-addr-2.cpp Fri Aug 5 20:44:06 2016 @@ -65,20 +65,17 @@ const int *int6() { const int *int7(int x) { const int &x2 = x; // expected-note{{binding reference variable 'x2' here}} - const int &x3 = x2; return &x2; // expected-warning{{address of stack memory associated with local variable 'x' returned}} } const int *int8(const int &x = 5) { const int &x2 = x; - const int &x3 = x2; return &x2; } const int *int9() { const int &x = 5; // expected-note{{binding reference variable 'x' here}} const int &x2 = x; // expected-note{{binding reference variable 'x2' here}} - const int &x3 = x2; return &x2; // expected-warning{{returning address of local temporary object}} } } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits