This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] ConditionBRVisitor: emphasize value with apostrophes
AbandonedPublic

Authored by Charusso on Mar 8 2019, 2:03 PM.

Details

Summary

-

Diff Detail

Event Timeline

Charusso created this revision.Mar 8 2019, 2:03 PM
Charusso updated this revision to Diff 189939.Mar 8 2019, 2:32 PM
  • Removed TrackConstraintBRVisitor value-emphasize from here.
NoQ added a comment.Mar 25 2019, 2:40 PM

Mmm, i'm not sure this is the right thing to do. It's more of a language thing. For instance, in my understanding, both null in Assuming 'x' is null and true in Assuming 'y' is true are adjectives (cf. Assuming 'x' is small enough, Assuming 'y' is true to its principles, etc.) so it doesn't really make sense to treat them as values. It seems to me that the original intent here was to only apply quotes to proper nouns (i.e., Assuming this "x" thing of yours, as you call it, is greater than 152), while keeping the common nouns, such as 152, unquoted.

In D59155#1442339, @NoQ wrote:

It seems to me that the original intent here was to only apply quotes to proper nouns (i.e., Assuming this "x" thing of yours, as you call it, is greater than 152), while keeping the common nouns, such as 152, unquoted.

What do you think to apply that on variables (and macros?) only? It would be halfway to my programmer thinking and the original grammatical sense.
(e.g. in test/Analysis/keychainAPI-diagnostic-visitor.m:
if (st == noErr) // expected-note {{Assuming 'st' is equal to 'noErr'}})

Charusso abandoned this revision.Apr 14 2019, 9:16 AM
Charusso marked an inline comment as done.

I am okay with the grammatical sense, just we are programmers.
Address that only "variable" which is an enum in D60671.