[cfe-dev] Help writing fixits in clang
    Andy Gibbs via cfe-dev 
    cfe-dev at lists.llvm.org
       
    Wed Dec 12 02:03:47 PST 2018
    
    
  
Hi,
I'd like to add a fixit (or two) to suggest parentheses in the following expressions:
  struct S { float value; };
  S operator"" _f(long double t);
  void test() {
    int i = 0x2e+'a';          // fixit: (0x2e)+'a'
    float j = 100.0_e-10.0;    // fixit: (100.0_e)-10.0
    float k = 100.0_f.value;   // fixit: (100.0_f).value
    int l = 0x2e+i;            // fixit: (0x2e)+i
  }
However, I am not sure of the correct way to do this.
Would someone, please, give me a quick tutorial or, if easier, point out an similar example in the clang code.
Many thanks,
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181212/429fb906/attachment.html>
    
    
More information about the cfe-dev
mailing list