From 554bcb69c2d785a011a30e7db87a36a87fe7db10 Mon Sep 17 00:00:00 2001 From: dim Date: Wed, 15 Aug 2012 20:02:54 +0000 Subject: Vendor import of clang trunk r161861: http://llvm.org/svn/llvm-project/cfe/trunk@161861 --- test/Index/annotate-comments-preprocessor.c | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 test/Index/annotate-comments-preprocessor.c (limited to 'test/Index/annotate-comments-preprocessor.c') diff --git a/test/Index/annotate-comments-preprocessor.c b/test/Index/annotate-comments-preprocessor.c new file mode 100644 index 0000000..202847f --- /dev/null +++ b/test/Index/annotate-comments-preprocessor.c @@ -0,0 +1,45 @@ +// RUN: %clang_cc1 -fsyntax-only -I%S/Inputs %s + +// As long as none of this crashes, we don't care about comments in +// preprocessor directives. + +#include "annotate-comments-preprocessor.h" /* Aaa. */ /* Bbb. */ +#include "annotate-comments-preprocessor.h" /* Aaa. */ +#include "annotate-comments-preprocessor.h" /** Aaa. */ +#include "annotate-comments-preprocessor.h" /**< Aaa. */ +#include "annotate-comments-preprocessor.h" // Aaa. +#include "annotate-comments-preprocessor.h" /// Aaa. +#include "annotate-comments-preprocessor.h" ///< Aaa. + +#define A0 0 +#define A1 1 /* Aaa. */ +#define A2 1 /** Aaa. */ +#define A3 1 /**< Aaa. */ +#define A4 1 // Aaa. +#define A5 1 /// Aaa. +#define A6 1 ///< Aaa. + +int A[] = { A0, A1, A2, A3, A4, A5, A6 }; + +#if A0 /** Aaa. */ +int f(int a1[A1], int a2[A2], int a3[A3], int a4[A4], int a5[A5], int a6[A6]); +#endif /** Aaa. */ + +#if A1 /** Aaa. */ +int g(int a1[A1], int a2[A2], int a3[A3], int a4[A4], int a5[A5], int a6[A6]); +#endif /* Aaa. */ + +#pragma once /** Aaa. */ + +#define FOO \ + do { \ + /* Aaa. */ \ + /** Aaa. */ \ + /**< Aaa. */ \ + ; \ + } while(0) + +void h(void) { + FOO; +} + -- cgit v1.1