]> granicus.if.org Git - clang/commit
Start adding the infrastructure for handling TypoExprs.
authorKaelyn Takata <rikka@google.com>
Mon, 27 Oct 2014 18:07:37 +0000 (18:07 +0000)
committerKaelyn Takata <rikka@google.com>
Mon, 27 Oct 2014 18:07:37 +0000 (18:07 +0000)
commit4a3c68bb85aa70525f30ad2970272b908bf8359d
tree813c088326d0369934ea9820ea43beae671ce44a
parentcd318ced609f3e2e2aab80a1904d59df32a97271
Start adding the infrastructure for handling TypoExprs.

Part of the infrastructure is a map from a TypoExpr to the Sema-specific
state needed to correct it, along with helpers to ease dealing with the
state.

The the typo count is propagated up the stack of
ExpressionEvaluationContextRecords when one is popped off of to
avoid accidentally dropping TypoExprs on the floor. For example,
the attempted correction of g() in test/CXX/class/class.mem/p5-0x.cpp
happens with an ExpressionEvaluationContextRecord that is popped off
the stack prior to ActOnFinishFullExpr being called and the tree
transform for TypoExprs being run.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220695 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
include/clang/Sema/SemaInternal.h
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaLookup.cpp