layers: Disable clang-format for gen'd header
authorMark Lobodzinski <mark@lunarg.com>
Wed, 25 Jan 2017 16:33:25 +0000 (09:33 -0700)
committerMark Lobodzinski <mark@lunarg.com>
Thu, 26 Jan 2017 17:01:27 +0000 (10:01 -0700)
The vk_validation_error_messages.h header file now disables
clang-format, as it is generated in-source.

Change-Id: Ie9abf005c79b67cdb5843025ce19091d23fe1bec

layers/spec.py

index 671bd27..0ee4e56 100644 (file)
@@ -182,7 +182,9 @@ class Specification:
         file_contents = []
         file_contents.append(self.copyright)
         file_contents.append('\n#pragma once')
-        file_contents.append('#include <unordered_map>')
+        file_contents.append('\n// Disable auto-formatting for generated file')
+        file_contents.append('// clang-format off')
+        file_contents.append('\n#include <unordered_map>')
         file_contents.append('\n// enum values for unique validation error codes')
         file_contents.append('//  Corresponding validation error message for each enum is given in the mapping table below')
         file_contents.append('//  When a given error occurs, these enum values should be passed to the as the messageCode')
@@ -572,4 +574,4 @@ if __name__ == "__main__":
 #<em class="parameter"><code>flags</code></em> <span class="normative">must</span> be <code class="literal">0</code>
 #</li><li class="listitem">
 #<em class="parameter"><code>pQueueCreateInfos</code></em> <span class="normative">must</span> be a pointer to an array of <em class="parameter"><code>queueCreateInfoCount</code></em> valid <code class="code">VkDeviceQueueCreateInfo</code> structures
-#</li>
\ No newline at end of file
+#</li>