Skip to content
  1. Jan 13, 2012
    • Richard Smith's avatar
      Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its: · 8d06f424
      Richard Smith authored
       - If the declarator is at the start of a line, and the previous line contained
         another declarator and ended with a comma, then that comma was probably a
         typo for a semicolon:
      
         int n = 0, m = 1, l = 2, // k = 5;
         myImportantFunctionCall(); // oops!
      
       - If removing the parentheses would correctly initialize the object, then
         produce a note suggesting that fix.
      
       - Otherwise, if there is a simple initializer we can suggest which performs
         value-initialization, then provide a note suggesting a correction to that
         initializer.
      
      Sema::Declarator now tracks the location of the comma prior to the declarator in
      the declaration, if there is one, to facilitate providing the note. The code to
      determine an appropriate initializer from the -Wuninitialized warning has been
      factored out to allow use in both that and -Wvexing-parse.
      
      llvm-svn: 148072
      8d06f424
    • Eli Friedman's avatar
      Recommit r148056 with fixes to deal with weirdness with bitfields in unions. · 2e108376
      Eli Friedman authored
      Original message: Make sure adding a field to a struct never reduces its size.  PR11745.
      
      llvm-svn: 148070
      2e108376
    • Eli Friedman's avatar
      Revert r148056 while I investigate failures. · 43f1834f
      Eli Friedman authored
      llvm-svn: 148068
      43f1834f
  2. Jan 12, 2012
  3. Jan 11, 2012
Loading