summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2015-01-13 02:32:02 +0000
committerRichard Trieu <rtrieu@google.com>2015-01-13 02:32:02 +0000
commit85f2b4c24c7b307e65000b79c020cade580f8e48 (patch)
tree867fd982f496379247081f1b657e4c9a20a9c8cb /include
parent12421c320c160d193726f50f4d53f1457d0e905f (diff)
Extend the self move warning to record types.
Move the logic for checking self moves into SemaChecking and add that function to Sema since it is now used in multiple places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225756 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/Sema/Sema.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h
index 95fc68fbc1..2ba74b12f6 100644
--- a/include/clang/Sema/Sema.h
+++ b/include/clang/Sema/Sema.h
@@ -3326,6 +3326,10 @@ public:
void DiagnoseEmptyLoopBody(const Stmt *S,
const Stmt *PossibleBody);
+ /// Warn if a value is moved to itself.
+ void DiagnoseSelfMove(const Expr *LHSExpr, const Expr *RHSExpr,
+ SourceLocation OpLoc);
+
ParsingDeclState PushParsingDeclaration(sema::DelayedDiagnosticPool &pool) {
return DelayedDiagnostics.push(pool);
}