Skip to content
Snippets Groups Projects
  1. Jan 23, 2014
  2. Apr 17, 2013
    • Andy Gibbs's avatar
      Extended VerifyDiagnosticConsumer to also verify source file for diagnostic. · b42f2007
      Andy Gibbs authored
      VerifyDiagnosticConsumer previously would not check that the diagnostic and
      its matching directive referenced the same source file.  Common practice was
      to create directives that referenced other files but only by line number,
      and this led to problems such as when the file containing the directive
      didn't have enough lines to match the location of the diagnostic in the
      other file, leading to bizarre file formatting and other oddities.
      
      This patch causes VerifyDiagnosticConsumer to match source files as well as
      line numbers.  Therefore, a new syntax is made available for directives, for
      example:
      
      // expected-error@file:line {{diagnostic message}}
      
      This extends the @line feature where "file" is the file where the diagnostic
      is generated.  The @line syntax is still available and uses the current file
      for the diagnostic.  "file" can be specified either as a relative or absolute
      path - although the latter has less usefulness, I think!  The #include search
      paths will be used to locate the file and if it is not found an error will be
      generated.
      
      The new check is not optional: if the directive is in a different file to the
      diagnostic, the file must be specified.  Therefore, a number of test-cases
      have been updated with regard to this.
      
      This closes out PR15613.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179677 91177308-0d34-0410-b5e6-96231b3b80d8
      b42f2007
  3. Feb 07, 2013
  4. Dec 11, 2012
  5. Aug 10, 2012
    • Jordan Rose's avatar
      Update VerifyDiagnosticConsumer to only get directives during parsing. · 7c304f56
      Jordan Rose authored
      The old behavior was to re-scan any files (like modules) where we may have
      directives but won't actually be parsing during the -verify invocation.
      Now, we keep the old behavior in Debug builds as a sanity check (though
      modules are a known entity), and expect all legitimate directives to come
      from comments seen by the preprocessor.
      
      This also affects the ARC migration tool, which captures diagnostics in
      order to filter some out. This change adds an explicit cleanup to
      CaptureDiagnosticsConsumer in order to let its sub-consumer handle the
      real end of diagnostics.
      
      This was originally split into four patches, but the tests do not run
      cleanly without all four, so I've combined them into one commit.
      
      Patches by Andy Gibbs, with slight modifications from me.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161650 91177308-0d34-0410-b5e6-96231b3b80d8
      7c304f56
  6. Mar 01, 2012
  7. Jan 04, 2012
  8. Jan 03, 2012
    • Douglas Gregor's avatar
      Eliminate the uglified keyword __import_module__ for importing · c13a34b6
      Douglas Gregor authored
      modules. This leaves us without an explicit syntax for importing
      modules in C/C++, because such a syntax needs to be discussed
      first. In Objective-C/Objective-C++, the @import syntax is used to
      import modules.
      
      Note that, under -fmodules, C/C++ programs can import modules via the
      #include mechanism when a module map is in place for that header. This
      allows us to work with modules in C/C++ without committing to a syntax.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147467 91177308-0d34-0410-b5e6-96231b3b80d8
      c13a34b6
  9. Nov 29, 2011
  10. Nov 16, 2011
  11. Sep 14, 2011
  12. Sep 12, 2011
  13. Aug 31, 2011
  14. Aug 27, 2011
  15. Aug 26, 2011
  16. Aug 24, 2011
    • Douglas Gregor's avatar
      Introduce a depth-first search of modules into the module manager, · 851c75a2
      Douglas Gregor authored
      which supports both pre-order and post-order traversal via a visitor
      mechanism. Use this depth-first search with a post-order traversal to
      give predictable ordering semantics when walking all of the lexical
      declarations in the translation unit.
      
      Eventually, module imports will occur in the source code rather than
      at the beginning, and we'll have to revisit this walk.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138490 91177308-0d34-0410-b5e6-96231b3b80d8
      851c75a2
    • Douglas Gregor's avatar
      In the AST reader, switch name lookup within a DeclContect over to the · 0d95f77b
      Douglas Gregor authored
      module DAG-based lookup scheme. This required some reshuffling, so
      that each module stores its own mapping from DeclContexts to their
      lexical and visible sets for those DeclContexts (rather than one big
      "chain"). 
      
      Overall, this allows simple qualified name lookup into the translation
      unit to gather results from multiple modules, with the lookup results
      in module B shadowing the lookup results in module A when B imports A.
      
      Walking all of the lexical declarations in a module DAG is still a
      mess; we'll end up walking the loaded module list backwards, which
      works fine for chained PCH but doesn't make sense in a DAG. I'll
      tackle this issue as a separate commit.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138463 91177308-0d34-0410-b5e6-96231b3b80d8
      0d95f77b
Loading