<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Should not hit the disk when reading annotations"
   href="https://bugs.llvm.org/show_bug.cgi?id=33688">33688</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Should not hit the disk when reading annotations
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Modules
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>vvasilev@cern.ch
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>echo 'void* func(char* p)   __attribute__((annotate("blah"))); void*
func(char* p){return p;}' > HEADER.h

   clang++ -std=c++14 -x c++-header -o HEADER.h.pch HEADER.h
   chmod a-r HEADER.h
   echo 'char i; void* ptr = func(&i);' | clang++ -v -std=c++14 -Xclang
-fno-validate-pch -include-pch HEADER.h.pch -c -Xclang -emit-llvm -o -
-x c++ -


creates an error - again because it touches disk where it shouldn't,
with this backtrace:


#0  clang::TextDiagnosticPrinter::HandleDiagnostic (this=0xbbab1d0,
Level=clang::DiagnosticsEngine::Fatal, Info=...) at
/home/axel/build/llvm-orig/src/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp:111
#1  0x0000000003faf738 in clang::DiagnosticIDs::EmitDiag
(this=0xbba9790, Diag=..., DiagLevel=clang::DiagnosticIDs::Fatal) at
/home/axel/build/llvm-orig/src/tools/clang/lib/Basic/DiagnosticIDs.cpp:682
#2  0x0000000003faf698 in clang::DiagnosticIDs::ProcessDiag
(this=0xbba9790, Diag=...) at
/home/axel/build/llvm-orig/src/tools/clang/lib/Basic/DiagnosticIDs.cpp:674
#3  0x0000000003fa516a in clang::DiagnosticsEngine::ProcessDiag
(this=0xbbaa450) at
/home/axel/build/llvm-orig/src/tools/clang/include/clang/Basic/Diagnostic.h:879
#4  0x0000000003fa1f94 in
clang::DiagnosticsEngine::EmitCurrentDiagnostic (this=0xbbaa450,
Force=false) at
/home/axel/build/llvm-orig/src/tools/clang/lib/Basic/Diagnostic.cpp:418
#5  0x0000000001e4cc6c in clang::DiagnosticBuilder::Emit
(this=0x7fffffff7c10) at
/home/axel/build/llvm-orig/src/tools/clang/include/clang/Basic/Diagnostic.h:1013
#6  0x0000000001e4cc9a in clang::DiagnosticBuilder::~DiagnosticBuilder
(this=0x7fffffff7c10, __in_chrg=<optimized out>)
    at
/home/axel/build/llvm-orig/src/tools/clang/include/clang/Basic/Diagnostic.h:1036
#7  0x0000000003fb297a in clang::SrcMgr::ContentCache::getBuffer
(this=0xbbb92d8, Diag=..., SM=..., Loc=..., Invalid=0x7fffffff82c0)
    at
/home/axel/build/llvm-orig/src/tools/clang/lib/Basic/SourceManager.cpp:123
#8  0x0000000003fb76c6 in ComputeLineNumbers (Diag=..., FI=0xbbb92d8,
Alloc=..., SM=..., Invalid=@0x7fffffff82c0: false) at
/home/axel/build/llvm-orig/src/tools/clang/lib/Basic/SourceManager.cpp:1186
#9  0x0000000003fb800a in clang::SourceManager::getLineNumber
(this=0xbbad1a0, FID=..., FilePos=63, Invalid=0x7fffffff833f)
    at
/home/axel/build/llvm-orig/src/tools/clang/lib/Basic/SourceManager.cpp:1298
#10 0x0000000003fb8724 in clang::SourceManager::getPresumedLoc
(this=0xbbad1a0, Loc=..., UseLineDirectives=true) at
/home/axel/build/llvm-orig/src/tools/clang/lib/Basic/SourceManager.cpp:1462
#11 0x0000000004192a13 in
clang::CodeGen::CodeGenModule::EmitAnnotationUnit (this=0xbbe1620,
Loc=...) at
/home/axel/build/llvm-orig/src/tools/clang/lib/CodeGen/CodeGenModule.cpp:1494
#12 0x0000000004192bda in
clang::CodeGen::CodeGenModule::EmitAnnotateAttr (this=0xbbe1620,
GV=0xbbc2dd8, AA=0xbbeacb0, L=...)
    at
/home/axel/build/llvm-orig/src/tools/clang/lib/CodeGen/CodeGenModule.cpp:1513
#13 0x0000000004192d82 in
clang::CodeGen::CodeGenModule::AddGlobalAnnotations (this=0xbbe1620,
D=0xbbeaa28, GV=0xbbc2dd8)
    at
/home/axel/build/llvm-orig/src/tools/clang/lib/CodeGen/CodeGenModule.cpp:1531
#14 0x00000000041999ed in
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition
(this=0xbbe1620, GD=..., GV=0xbbc2dd8)
    at
/home/axel/build/llvm-orig/src/tools/clang/lib/CodeGen/CodeGenModule.cpp:3178
#15 0x00000000041950e0 in
clang::CodeGen::CodeGenModule::EmitGlobalDefinition (this=0xbbe1620,
GD=..., GV=0x0) at
/home/axel/build/llvm-orig/src/tools/clang/lib/CodeGen/CodeGenModule.cpp:2016
#16 0x000000000419412c in clang::CodeGen::CodeGenModule::EmitGlobal
(this=0xbbe1620, GD=...) at
/home/axel/build/llvm-orig/src/tools/clang/lib/CodeGen/CodeGenModule.cpp:1792
#17 0x000000000419d7e7 in
clang::CodeGen::CodeGenModule::EmitTopLevelDecl (this=0xbbe1620,
D=0xbbeaa28) at
/home/axel/build/llvm-orig/src/tools/clang/lib/CodeGen/CodeGenModule.cpp:3892</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>