aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r--lib/Analysis/CFRefCount.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index 50ddbba5b2..c629ad1d96 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -93,12 +93,14 @@ static NamingConvention deriveNamingConvention(Selector S) {
// Skip '_'.
if (*s == '_') {
if (InPossiblePrefix) {
+ // If we already have a convention, return it. Otherwise, skip
+ // the prefix as if it wasn't there.
+ if (C != NoConvention)
+ break;
+
InPossiblePrefix = false;
AtBeginning = true;
- // Discard whatever 'convention' we
- // had already derived since it occurs
- // in the prefix.
- C = NoConvention;
+ assert(C == NoConvention);
}
++s;
continue;