]> granicus.if.org Git - clang/commitdiff
Forcing it to be an error when there is no Documentation list specified for an attrib...
authorAaron Ballman <aaron@aaronballman.com>
Mon, 17 Feb 2014 18:23:02 +0000 (18:23 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 17 Feb 2014 18:23:02 +0000 (18:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201524 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/ClangAttrEmitter.cpp

index c6b12d7fc4b22d415244c818967d0511885b4f71..39d815eae7f9bdfe249f264888a297a21fa5f461 100644 (file)
@@ -1383,6 +1383,17 @@ void EmitClangAttrClass(RecordKeeper &Records, raw_ostream &OS) {
   for (std::vector<Record*>::iterator i = Attrs.begin(), e = Attrs.end();
        i != e; ++i) {
     Record &R = **i;
+
+    // FIXME: Currently, documentation is generated as-needed due to the fact
+    // that there is no way to allow a generated project "reach into" the docs
+    // directory (for instance, it may be an out-of-tree build). However, we want
+    // to ensure that every attribute has a Documentation field, and produce an
+    // error if it has been neglected. Otherwise, the on-demand generation which
+    // happens server-side will fail. This code is ensuring that functionality,
+    // even though this Emitter doesn't technically need the documentation.
+    // When attribute documentation can be generated as part of the build
+    // itself, this code can be removed.
+    (void)R.getValueAsListOfDefs("Documentation");
     
     if (!R.getValueAsBit("ASTNode"))
       continue;